Skip to content

Commit

Permalink
Merge pull request #1352 from hashicorp/sebasslash/disable-ci-paralle…
Browse files Browse the repository at this point in the history
…lism

Temporarily disable parallelism for CI
  • Loading branch information
brandonc committed May 9, 2024
2 parents a015dfd + 6dbf30d commit 2170d0d
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 68 deletions.
130 changes: 67 additions & 63 deletions .github/actions/test-provider-tfe/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: Test
name: TESTS ARE TEMPOARILY DISABLED
description: Tests terraform-provider-tfe within a matrix
inputs:
admin_configuration_token:
Expand Down Expand Up @@ -51,72 +51,76 @@ inputs:
runs:
using: composite
steps:
- name: Set up Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version-file: go.mod
cache: true

- name: Sync dependencies
- name: NO-OP
shell: bash
run: |
go mod download
go mod tidy
echo "Tests are skipped. Please test manually."
# - name: Set up Go
# uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
# with:
# go-version-file: go.mod
# cache: true

- name: Install gotestsum
shell: bash
run: go install gotest.tools/gotestsum@latest
# - name: Sync dependencies
# shell: bash
# run: |
# go mod download
# go mod tidy

- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
with:
workflow_conclusion: success
name: junit-test-summary
if_no_artifact_found: warn
branch: main
# - name: Install gotestsum
# shell: bash
# run: go install gotest.tools/gotestsum@latest

- name: Split acceptance tests
id: test_split
uses: hashicorp-forge/go-test-split-action@796beedbdb3d1bea14cad2d3057bab5c5cf15fe5 # v1.0.2
with:
index: ${{ inputs.matrix_index }}
total: ${{ inputs.matrix_total }}
junit-summary: ./ci-summary-provider.xml
# When tests are split and run concurrently, lists_tests arg in ci.yml will skip the TestAccTFESAMLSettings_omnibus test suite
list: ${{ inputs.list_tests }}
# - name: Download artifact
# id: download-artifact
# uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
# with:
# workflow_conclusion: success
# name: junit-test-summary
# if_no_artifact_found: warn
# branch: main

- name: Run Tests
shell: bash
env:
TFE_HOSTNAME: "${{ inputs.hostname }}"
TFE_TOKEN: "${{ inputs.token }}"
TFE_ADMIN_CONFIGURATION_TOKEN: ${{ inputs.admin_configuration_token }}
TFE_ADMIN_PROVISION_LICENSES_TOKEN: ${{ inputs.admin_provision_licenses_token }}
TFE_ADMIN_SECURITY_MAINTENANCE_TOKEN: ${{ inputs.admin_security_maintenance_token }}
TFE_ADMIN_SITE_ADMIN_TOKEN: ${{ inputs.admin_site_admin_token }}
TFE_ADMIN_SUBSCRIPTION_TOKEN: ${{ inputs.admin_subscription_token }}
TFE_ADMIN_SUPPORT_TOKEN: ${{ inputs.admin_support_token }}
TFE_ADMIN_VERSION_MAINTENANCE_TOKEN: ${{ inputs.admin_version_maintenance_token }}
TFE_USER1: tfe-provider-user1
TFE_USER2: tfe-provider-user2
TF_ACC: "1"
ENABLE_TFE: "${{ inputs.enterprise }}"
RUN_TASKS_URL: "http://testing-mocks.tfe:22180/runtasks/pass"
GITHUB_POLICY_SET_IDENTIFIER: "hashicorp/test-policy-set"
GITHUB_REGISTRY_MODULE_IDENTIFIER: "hashicorp/terraform-random-module"
GITHUB_WORKSPACE_IDENTIFIER: "hashicorp/terraform-random-module"
GITHUB_WORKSPACE_BRANCH: "main"
GITHUB_TOKEN: "${{ inputs.testing-github-token }}"
MOD_PROVIDER: github.com/hashicorp/terraform-provider-tfe
MOD_TFE: github.com/hashicorp/terraform-provider-tfe/internal/provider
MOD_VERSION: github.com/hashicorp/terraform-provider-tfe/version
run: |
gotestsum --junitfile summary.xml --format short-verbose -- $MOD_PROVIDER $MOD_TFE $MOD_VERSION -v -timeout=30m -run "${{ steps.test_split.outputs.run }}"
# - name: Split acceptance tests
# id: test_split
# uses: hashicorp-forge/go-test-split-action@796beedbdb3d1bea14cad2d3057bab5c5cf15fe5 # v1.0.2
# with:
# index: ${{ inputs.matrix_index }}
# total: ${{ inputs.matrix_total }}
# junit-summary: ./ci-summary-provider.xml
# # When tests are split and run concurrently, lists_tests arg in ci.yml will skip the TestAccTFESAMLSettings_omnibus test suite
# list: ${{ inputs.list_tests }}

# - name: Run Tests
# shell: bash
# env:
# TFE_HOSTNAME: "${{ inputs.hostname }}"
# TFE_TOKEN: "${{ inputs.token }}"
# TFE_ADMIN_CONFIGURATION_TOKEN: ${{ inputs.admin_configuration_token }}
# TFE_ADMIN_PROVISION_LICENSES_TOKEN: ${{ inputs.admin_provision_licenses_token }}
# TFE_ADMIN_SECURITY_MAINTENANCE_TOKEN: ${{ inputs.admin_security_maintenance_token }}
# TFE_ADMIN_SITE_ADMIN_TOKEN: ${{ inputs.admin_site_admin_token }}
# TFE_ADMIN_SUBSCRIPTION_TOKEN: ${{ inputs.admin_subscription_token }}
# TFE_ADMIN_SUPPORT_TOKEN: ${{ inputs.admin_support_token }}
# TFE_ADMIN_VERSION_MAINTENANCE_TOKEN: ${{ inputs.admin_version_maintenance_token }}
# TFE_USER1: tfe-provider-user1
# TFE_USER2: tfe-provider-user2
# TF_ACC: "1"
# ENABLE_TFE: "${{ inputs.enterprise }}"
# RUN_TASKS_URL: "http://testing-mocks.tfe:22180/runtasks/pass"
# GITHUB_POLICY_SET_IDENTIFIER: "hashicorp/test-policy-set"
# GITHUB_REGISTRY_MODULE_IDENTIFIER: "hashicorp/terraform-random-module"
# GITHUB_WORKSPACE_IDENTIFIER: "hashicorp/terraform-random-module"
# GITHUB_WORKSPACE_BRANCH: "main"
# GITHUB_TOKEN: "${{ inputs.testing-github-token }}"
# MOD_PROVIDER: github.com/hashicorp/terraform-provider-tfe
# MOD_TFE: github.com/hashicorp/terraform-provider-tfe/internal/provider
# MOD_VERSION: github.com/hashicorp/terraform-provider-tfe/version
# run: |
# gotestsum --junitfile summary.xml --format short-verbose -- $MOD_PROVIDER $MOD_TFE $MOD_VERSION -v -timeout=30m -run "${{ steps.test_split.outputs.run }}"

- name: Upload test artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: junit-test-summary-${{ matrix.index }}
path: summary.xml
retention-days: 1
# - name: Upload test artifacts
# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
# with:
# name: junit-test-summary-${{ matrix.index }}
# path: summary.xml
# retention-days: 1
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ concurrency:
cancel-in-progress: true

jobs:
notice:
name: TESTS ARE TEMPORARILY DISABLED- RUN CHANGED RESOURCE TESTS LOCALLY
runs-on: ubuntu-latest
steps:
- name: NO-OP
run: |
echo "Tests are skipped. Please test manually."
lint:
name: lint
runs-on: ubuntu-latest
Expand All @@ -24,8 +31,8 @@ jobs:
fail-fast: false
matrix:
# If you adjust these parameters, also adjust the jrm input files on the "Merge reports" step below
total: [ 5 ]
index: [ 0, 1, 2, 3, 4 ]
total: [ 1 ]
index: [ 0 ]
steps:
- name: Fetch Outputs
id: tflocal
Expand Down Expand Up @@ -73,7 +80,7 @@ jobs:
run: npm install -g junit-report-merger

- name: Merge reports
run: jrm ./ci-summary-provider.xml "junit-test-summary-0/*.xml" "junit-test-summary-1/*.xml" "junit-test-summary-2/*.xml" "junit-test-summary-3/*.xml" "junit-test-summary-4/*.xml"
run: jrm ./ci-summary-provider.xml "junit-test-summary-0/*.xml"

- name: Upload test artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-tfe-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
strategy:
fail-fast: false
matrix:
total: [ 5 ]
index: [ 0, 1, 2, 3, 4 ]
total: [ 1 ]
index: [ 0 ]
steps:
- name: Fetch Outputs
id: tflocal
Expand Down

0 comments on commit 2170d0d

Please sign in to comment.