@@ -24,10 +24,27 @@ jobs:
2424 - name : Run Unit Tests
2525 run : ./scripts/unit.sh
2626
27- integration :
28- name : Integration Tests
27+ integration-matrix :
28+ name : Integration Matrix
2929 runs-on : ubuntu-latest
30+ outputs :
31+ matrix : ${{ steps.set-matrix.outputs.matrix }}
3032 needs : unit
33+ steps :
34+ - name : Set Matrix
35+ id : set-matrix
36+ run : |
37+ matrix="$(jq -r -c '.integration.matrix' ./config.json)"
38+ printf "Output: matrix=%s\n" "${matrix}"
39+ printf "matrix=%s\n" "${matrix}"
40+
41+ integration :
42+ name : Integration Test
43+ runs-on : ubuntu-latest
44+ needs : integration-matrix
45+ strategy :
46+ matrix :
47+ include : ${{ fromJSON(needs.integration-matrix.outputs.matrix) }}
3148 steps :
3249
3350 - name : Setup Go
@@ -43,13 +60,34 @@ jobs:
4360 - name : Run Integration Tests
4461 env :
4562 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46- run : ./scripts/integration.sh --platform docker --github-token "${GITHUB_TOKEN}"
63+ run : |
64+ ./scripts/integration.sh \
65+ --platform docker \
66+ --github-token "${GITHUB_TOKEN}" \
67+ --cached ${{ matrix.cached }} \
68+ --parallel ${{ matrix.parallel }}
69+
70+ roundup :
71+ name : Integration Tests
72+ if : ${{ always() }}
73+ runs-on : ubuntu-latest
74+ needs : integration
75+ steps :
76+ - run : |
77+ result="${{ needs.integration.result }}"
78+ if [[ "${result}" == "success" ]]; then
79+ echo "All integration tests passed"
80+ exit 0
81+ else
82+ echo "One or more integration tests failed"
83+ exit 1
84+ fi
4785
4886 approve :
4987 name : Approve Bot PRs
5088 if : ${{ github.event.pull_request.user.login == 'cf-buildpacks-eng' || github.event.pull_request.user.login == 'dependabot[bot]' }}
5189 runs-on : ubuntu-latest
52- needs : integration
90+ needs : roundup
5391 steps :
5492
5593 - name : Check Commit Verification
0 commit comments