|
19 | 19 | tests:
|
20 | 20 | name: run
|
21 | 21 | runs-on: ubuntu-latest
|
22 |
| - timeout-minutes: 60 |
| 22 | + timeout-minutes: 40 |
| 23 | + strategy: |
| 24 | + fail-fast: false |
| 25 | + matrix: |
| 26 | + # If you adjust these parameters, also adjust the jrm input files on the "Merge reports" step below |
| 27 | + total: [ 5 ] |
| 28 | + index: [ 0, 1, 2, 3, 4 ] |
| 29 | + steps: |
| 30 | + - name: Fetch Outputs |
| 31 | + id: tflocal |
| 32 | + uses: hashicorp-forge/terraform-cloud-action/outputs@5583d5f554d268ac91b3c37fd0a5e9da2c78c017 # v1.1.0 |
| 33 | + with: |
| 34 | + token: "${{ secrets.TF_WORKFLOW_TFLOCAL_CLOUD_TFC_TOKEN }}" |
| 35 | + organization: hashicorp-v2 |
| 36 | + workspace: tflocal-terraform-provider-tfe |
| 37 | + |
| 38 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 39 | + |
| 40 | + - uses: ./.github/actions/test-provider-tfe |
| 41 | + with: |
| 42 | + matrix_index: ${{ matrix.index }} |
| 43 | + matrix_total: ${{ matrix.total }} |
| 44 | + hostname: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).ngrok_domain }} |
| 45 | + token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_token }} |
| 46 | + testing-github-token: ${{ secrets.TESTING_GITHUB_TOKEN }} |
| 47 | + admin_configuration_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.configuration }} |
| 48 | + admin_provision_licenses_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.provision-licenses }} |
| 49 | + admin_security_maintenance_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.security-maintenance }} |
| 50 | + admin_site_admin_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.site-admin }} |
| 51 | + admin_subscription_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.subscription }} |
| 52 | + admin_support_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.support }} |
| 53 | + admin_version_maintenance_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.version-maintenance }} |
| 54 | + # Run terminal cmd 'go help testflag' to learn more about -list flag |
| 55 | + # action.yml uses https://github.com/hashicorp-forge/go-test-split-action/blob/main/action.yml to split acceptance tests |
| 56 | + # which runs against all tests using the list arg |
| 57 | + # lists_tests regex is used to skip the TestAccTFESAMLSettings_omnibus test suite and any test matching TestAcc*_RunDependent for CI tests only |
| 58 | + list_tests: "[^(TestAccTFESAMLSettings_omnibus|TestAcc.*_RunDependent)]" |
| 59 | + test_name: "tests" |
| 60 | + |
| 61 | + run-dependent-tests: |
| 62 | + name: run |
| 63 | + runs-on: ubuntu-latest |
| 64 | + timeout-minutes: 40 |
23 | 65 | strategy:
|
24 | 66 | fail-fast: false
|
25 | 67 | matrix:
|
@@ -54,12 +96,13 @@ jobs:
|
54 | 96 | # Run terminal cmd 'go help testflag' to learn more about -list flag
|
55 | 97 | # action.yml uses https://github.com/hashicorp-forge/go-test-split-action/blob/main/action.yml to split acceptance tests
|
56 | 98 | # which runs against all tests using the list arg
|
57 |
| - # lists_tests regex is used to skip the TestAccTFESAMLSettings_omnibus test suite for CI tests only |
58 |
| - list_tests: "[^(TestAccTFESAMLSettings_omnibus)]" |
| 99 | + # lists_tests regex is used to include the any test matching TestAcc*_RunDependent for CI tests only |
| 100 | + list_tests: "TestAcc.*_RunDependent" |
| 101 | + test_name: "run-dependent-tests" |
59 | 102 |
|
60 | 103 | tests-combine-summaries:
|
61 | 104 | name: Combine Test Reports
|
62 |
| - needs: [ tests ] |
| 105 | + needs: [ tests, run-dependent-tests ] |
63 | 106 | runs-on: ubuntu-latest
|
64 | 107 | steps:
|
65 | 108 | - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
|
73 | 116 | run: npm install -g junit-report-merger
|
74 | 117 |
|
75 | 118 | - name: Merge reports
|
76 |
| - 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" |
| 119 | + run: jrm ./ci-summary-provider.xml "junit-tests-summary-0/*.xml" "junit-tests-summary-1/*.xml" "junit-tests-summary-2/*.xml" "junit-tests-summary-3/*.xml" "junit-tests-summary-4/*.xml" "junit-tests-summary/*.xml" "junit-run-dependent-tests-summary-0/*.xml" |
77 | 120 |
|
78 | 121 | - name: Upload test artifacts
|
79 | 122 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
0 commit comments