1111permissions :
1212 contents : read
1313
14+ # TODO Make a common workflow for all providers since they use the exact same steps.
1415jobs :
1516 action-start :
1617 name : GitHub Actions Test (spawn)
1718 runs-on : ubuntu-latest
18- strategy :
19- matrix :
20- provider : [aws, hyperstack]
21- fail-fast : false
2219 outputs :
2320 runner-aws : ${{ steps.gen-output.outputs.runner_aws }}
24- runner-hyperstack : ${{ steps.gen-output.outputs.runner_hyperstack }}
2521 steps :
2622 - name : Checkout
2723 id : checkout
@@ -35,13 +31,13 @@ jobs:
3531 github-token : ${{ secrets.SLAB_ACTION_TOKEN }}
3632 slab-url : ${{ secrets.SLAB_BASE_URL_PRE_PROD }}
3733 job-secret : ${{ secrets.JOB_SECRET }}
38- backend : ${{ matrix.provider }}
39- profile : ci-test
34+ backend : terraform
35+ profile : aws- ci-test
4036
4137 - name : Generate output
4238 id : gen-output
4339 run : |
44- echo "runner_${{ matrix.provider }} =${{ steps.test-start.outputs.label }}" >> "${GITHUB_OUTPUT}"
40+ echo "runner_aws =${{ steps.test-start.outputs.label }}" >> "${GITHUB_OUTPUT}"
4541
4642 test-runner-alive-aws :
4743 name : Test runner is alive (AWS)
@@ -50,26 +46,11 @@ jobs:
5046 with :
5147 runner-name : ${{ needs.action-start.outputs.runner-aws }}
5248
53- test-runner-alive-hyperstack :
54- name : Test runner is alive (Hyperstack)
55- needs : [action-start]
56- uses : ./.github/workflows/registered_runner.yml
57- with :
58- runner-name : ${{ needs.action-start.outputs.runner-hyperstack }}
59-
6049 action-stop :
6150 name : GitHub Actions Test (terminate)
6251 runs-on : ubuntu-latest
63- needs : [action-start, test-runner-alive-aws, test-runner-alive-hyperstack ]
52+ needs : [action-start, test-runner-alive-aws ]
6453 if : ${{ always() && needs.action-start.result != 'skipped' }}
65- strategy :
66- matrix :
67- runner :
68- [
69- ' ${{ needs.action-start.outputs.runner-aws }}' ,
70- ' ${{ needs.action-start.outputs.runner-hyperstack }}'
71- ]
72- fail-fast : false
7354 steps :
7455 - name : Checkout
7556 id : checkout
8364 github-token : ${{ secrets.SLAB_ACTION_TOKEN }}
8465 slab-url : ${{ secrets.SLAB_BASE_URL_PRE_PROD }}
8566 job-secret : ${{ secrets.JOB_SECRET }}
86- label : ${{ matrix. runner }}
67+ label : ${{ needs.action-start.outputs. runner-aws }}
8768
8869 test-runner-removed-aws :
8970 name : Test runner is removed (AWS)
9475 must-exist : false
9576 secrets :
9677 READ_REPO_TOKEN : ${{ secrets.SLAB_ACTION_TOKEN }}
97-
98- test-runner-removed-hyperstack :
99- name : Test runner is removed (Hyperstack)
100- needs : [action-start, action-stop]
101- uses : ./.github/workflows/removed_runner.yml
102- with :
103- runner-name : ${{ needs.action-start.outputs.runner-hyperstack }}
104- must-exist : false
105- secrets :
106- READ_REPO_TOKEN : ${{ secrets.SLAB_ACTION_TOKEN }}
0 commit comments