From 7d1430628347d2f62bbccb0f5b36231b160b59b6 Mon Sep 17 00:00:00 2001 From: Sebastian Rivera Date: Wed, 8 May 2024 13:56:25 -0400 Subject: [PATCH 1/4] Disable parallelism for CI --- .github/actions/test-provider-tfe/action.yml | 2 +- .github/workflows/ci.yml | 6 +++--- .github/workflows/nightly-tfe-test.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/test-provider-tfe/action.yml b/.github/actions/test-provider-tfe/action.yml index 70ccd2bae..04567e3fe 100644 --- a/.github/actions/test-provider-tfe/action.yml +++ b/.github/actions/test-provider-tfe/action.yml @@ -112,7 +112,7 @@ runs: 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 }}" + gotestsum --junitfile summary.xml --format short-verbose -- $MOD_PROVIDER $MOD_TFE $MOD_VERSION -v -timeout=30m -parallel=1 -run "${{ steps.test_split.outputs.run }}" - name: Upload test artifacts uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b5f4a6de..afa2d9dda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,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 @@ -73,7 +73,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 diff --git a/.github/workflows/nightly-tfe-test.yml b/.github/workflows/nightly-tfe-test.yml index 26b3c7a26..ecc9d0285 100644 --- a/.github/workflows/nightly-tfe-test.yml +++ b/.github/workflows/nightly-tfe-test.yml @@ -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 From eec4f41ce1162d0c7392cdf8a8c2039bb6e25fe4 Mon Sep 17 00:00:00 2001 From: Sebastian Rivera Date: Wed, 8 May 2024 16:13:35 -0400 Subject: [PATCH 2/4] Bump go test timeout to 40m --- .github/actions/test-provider-tfe/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/test-provider-tfe/action.yml b/.github/actions/test-provider-tfe/action.yml index 04567e3fe..7c3a9bf23 100644 --- a/.github/actions/test-provider-tfe/action.yml +++ b/.github/actions/test-provider-tfe/action.yml @@ -112,7 +112,7 @@ runs: 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 -parallel=1 -run "${{ steps.test_split.outputs.run }}" + gotestsum --junitfile summary.xml --format short-verbose -- $MOD_PROVIDER $MOD_TFE $MOD_VERSION -v -timeout=40m -parallel=1 -run "${{ steps.test_split.outputs.run }}" - name: Upload test artifacts uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 From 3b38a4c6a9e5640b66b10d42765fa50980972425 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Thu, 9 May 2024 09:18:42 -0600 Subject: [PATCH 3/4] temporarily disable testing in CI --- .github/actions/test-provider-tfe/action.yml | 130 ++++++++++--------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/.github/actions/test-provider-tfe/action.yml b/.github/actions/test-provider-tfe/action.yml index 7c3a9bf23..76170836d 100644 --- a/.github/actions/test-provider-tfe/action.yml +++ b/.github/actions/test-provider-tfe/action.yml @@ -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: @@ -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=40m -parallel=1 -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 From 6dbf30d53b1e1a4a102f61661a7af2099ad1a6fe Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Thu, 9 May 2024 09:24:25 -0600 Subject: [PATCH 4/4] adds notice job as a separate check --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afa2d9dda..294c8fc09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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