1- name : Integration Tests
1+ name : Integration + Backward Compatibility Tests
22
33on :
4- workflow_run :
5- workflows : ["Build"]
6- types :
7- - completed
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
810 workflow_dispatch :
911
1012jobs :
1113 integration-tests :
1214 runs-on : ubuntu-latest
13- if : ${{ github.event.workflow_run.conclusion == 'success' }}
1415 env :
1516 CONDUCTOR_SERVER_URL : ${{ vars.SERVER_URL }}
1617 CONDUCTOR_AUTH_KEY : ${{ secrets.AUTH_KEY }}
1718 CONDUCTOR_AUTH_SECRET : ${{ secrets.AUTH_SECRET }}
18-
19+
20+ permissions :
21+ contents : read # minimal read access
22+ checks : write # needed for test report annotations
23+
1924 steps :
2025 - name : Checkout
2126 uses : actions/checkout@v3
22- with :
23- ref : ${{ github.event.workflow_run.head_sha }}
24- repository : ${{ github.event.workflow_run.repository.full_name }}
2527
2628 - name : Set up Go
2729 uses : actions/setup-go@v3
@@ -41,49 +43,17 @@ jobs:
4143 run : |
4244 gotestsum --format testname --junitfile report.xml -- -v ./test/integration_tests/...
4345
44- - name : Run Backward Compatibility Tests
45- run : |
46- echo "🚀 Starting Backward Compatibility Tests..."
47- cd test/backward_compatibility
48- chmod +x run_compatibility.sh
49- ./run_compatibility.sh
50-
51- - name : Set PR Status to Failure
52- if : ${{ failure() }}
53- uses : actions/github-script@v6
54- with :
55- script : |
56- const { owner, repo } = context.repo;
57- const sha = context.payload.workflow_run.head_sha;
58- await github.rest.repos.createCommitStatus({
59- owner: owner,
60- repo: repo,
61- sha: sha,
62- state: 'failure',
63- context: 'Integration Tests',
64- description: 'Integration tests failed.',
65- });
66-
67- - name : Set PR Status to Success
68- if : ${{ success() }}
69- uses : actions/github-script@v6
70- with :
71- script : |
72- const { owner, repo } = context.repo;
73- const sha = context.payload.workflow_run.head_sha;
74- await github.rest.repos.createCommitStatus({
75- owner: owner,
76- repo: repo,
77- sha: sha,
78- state: 'success',
79- context: 'Integration Tests',
80- description: 'Integration tests succeeded.',
81- });
82-
8346 - name : Publish test results
84- if : always()
47+ if : always()
8548 uses : dorny/test-reporter@v1
8649 with :
8750 name : Integration tests report
8851 path : report.xml
8952 reporter : java-junit
53+
54+ - name : Run Backward Compatibility Tests
55+ run : |
56+ echo "🚀 Starting Backward Compatibility Tests..."
57+ cd test/backward_compatibility
58+ chmod +x run_compatibility.sh
59+ ./run_compatibility.sh
0 commit comments