File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed
Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -26,28 +26,15 @@ concurrency:
2626 cancel-in-progress : true
2727
2828jobs :
29- set-matrix :
30- runs-on : ubuntu-latest
31- outputs :
32- matrix : ${{ steps.set-branches.outputs.matrix }}
33- steps :
34- # Set the matrix for the test_suite job. Use master and dev branches for scheduled runs
35- # and the branch of the push event otherwise
36- - id : set-branches
37- run : |
38- if [[ "${{ github.event_name }}" == "schedule" ]]; then
39- echo "matrix={\"branch\":[\"master\",\"dev\"]}" >> $GITHUB_OUTPUT
40- else
41- echo "matrix={\"branch\":[\"${{ github.head_ref }}\"]}" >> $GITHUB_OUTPUT
42- fi
43-
4429 test_suite :
4530 name : ' Test suite'
46- needs : set-matrix
4731 runs-on : ubuntu-latest
4832
4933 strategy :
50- matrix : ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
34+ matrix :
35+ # Run the workflow on master and dev branches if triggered by a schedule event.
36+ # Otherwise, run the workflow on the source branch of the pull request.
37+ branch : ${{ github.event_name == 'schedule' && fromJSON('["master", "dev"]') || fromJSON('["' + github.head_ref + '"]') }}
5138 fail-fast : false
5239
5340 # Use pygem:latest for master branch and pygem:dev otherwise
You can’t perform that action at this time.
0 commit comments