@@ -17,15 +17,51 @@ jobs:
17
17
- uses : ./.github/actions/lint-provider-tfe
18
18
19
19
tests :
20
- name : run
20
+ name : tests
21
21
runs-on : ubuntu-latest
22
- timeout-minutes : 60
22
+ timeout-minutes : 40
23
23
strategy :
24
24
fail-fast : false
25
25
matrix :
26
- # If you adjust these parameters, also adjust the jrm input files on the "Merge reports" step below
27
- total : [ 1 ]
28
- index : [ 0 ]
26
+ total : [5]
27
+ index : [0, 1, 2, 3, 4]
28
+ steps :
29
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30
+
31
+ - name : Fetch Outputs
32
+ id : tflocal
33
+ uses : hashicorp-forge/terraform-cloud-action/outputs@5583d5f554d268ac91b3c37fd0a5e9da2c78c017 # v1.1.0
34
+ with :
35
+ token : " ${{ secrets.TF_WORKFLOW_TFLOCAL_CLOUD_TFC_TOKEN }}"
36
+ organization : hashicorp-v2
37
+ workspace : tflocal-terraform-provider-tfe
38
+
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
+ list_tests : " [^(TestAccTFESAMLSettings_omnibus|TestAcc.*_RunDependent)]"
55
+
56
+ run-dependent-tests :
57
+ name : run-dependent-tests
58
+ runs-on : ubuntu-latest
59
+ timeout-minutes : 40
60
+ strategy :
61
+ fail-fast : false
62
+ matrix :
63
+ total : [1]
64
+ index : [0]
29
65
steps :
30
66
- name : Fetch Outputs
31
67
id : tflocal
55
91
# action.yml uses https://github.com/hashicorp-forge/go-test-split-action/blob/main/action.yml to split acceptance tests
56
92
# which runs against all tests using the list arg
57
93
# lists_tests regex is used to skip the TestAccTFESAMLSettings_omnibus test suite for CI tests only
58
- list_tests : " [^(TestAccTFESAMLSettings_omnibus)] "
94
+ list_tests : " TestAcc.*_RunDependent "
59
95
60
96
tests-combine-summaries :
61
97
name : Combine Test Reports
73
109
run : npm install -g junit-report-merger
74
110
75
111
- 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"
112
+ run : |
113
+ jrm ./ci-summary-provider.xml junit-tests-summary-*/*.xml
77
114
78
115
- name : Upload test artifacts
79
116
uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
@@ -82,14 +119,14 @@ jobs:
82
119
path : ./ci-summary-provider.xml
83
120
84
121
tests-summarize :
85
- name : Summarize Tests
86
- needs : [ tests ]
122
+ name : tests-summarize
123
+ needs : [ tests, run-dependent-tests ]
87
124
runs-on : ubuntu-latest
88
125
if : ${{ always() }}
89
126
steps :
90
127
- name : Check tests Status
91
128
run : |
92
- if [ "${{ needs.tests.result }}" = "success" ]; then
129
+ if [ "${{ needs.tests.result }}" = "success" ] && [ "${{ needs.run-dependent-tests.result }}" = "success" ] ; then
93
130
exit 0
94
131
fi
95
132
exit 1
0 commit comments