1414 required : true
1515 type : boolean
1616 default : false
17+ is-dispatch :
18+ description : ' Just to identify manual dispatch'
19+ required : true
20+ type : boolean
21+ default : true
1722 workflow_call :
1823 inputs :
1924 run-integration-tests :
2025 description : ' If integration test should be run'
2126 required : true
2227 type : boolean
2328 default : false
29+ # Concurrency : auto-cancel "old" jobs ie when pushing again
30+ # https://docs.github.com/fr/actions/using-jobs/using-concurrency
31+ concurrency :
32+ group : ${{ github.workflow }}-${{ inputs.run-integration-tests }}-${{ inputs.is-dispatch }}-${{ github.ref || github.run_id }}
33+ cancel-in-progress : true
2434env :
2535 GSK_DISABLE_ANALYTICS : true
2636defaults :
2737 run :
2838 shell : bash
2939jobs :
30- pre-check :
31- name : Pre check
32- runs-on : ubuntu-latest
33- steps :
34- - name : Checkout code
35- uses : actions/checkout@v4
36- with :
37- fetch-depth : 1
38- # Inspired from https://blog.pantsbuild.org/skipping-github-actions-jobs-without-breaking-branch-protection/
39- - id : files
40- name : Get changed files outside python-client
41- uses : tj-actions/changed-files@v39
42- with :
43- files_ignore : python-client/**
44-
45- - id : files-python
46- name : Get changed files in python-client
47- uses : tj-actions/changed-files@v39
48- with :
49- files : python-client/**
50-
51- - id : python_only
52- if : steps.files.outputs.any_changed != 'true'
53- name : Check for changes in python only
54- run : echo 'python_only=PYTHON_ONLY' >> $GITHUB_OUTPUT
55-
56- - id : python_at_least
57- if : steps.files-python.outputs.any_changed != 'true'
58- name : Check for changes in python
59- run : echo 'python_at_least=PYTHON_AT_LEAST' >> $GITHUB_OUTPUT
60-
6140 sonar :
6241 if : ${{ github.actor != 'dependabot[bot]' && (github.event_name == 'pull_request' || github.event_name == 'push') }}
6342 name : Sonar
9372 run : ./gradlew sonar --info --parallel
9473
9574 build :
96- needs : pre-check
97- if : ${{ needs.pre-check.outputs.python_only != 'PYTHON_ONLY' }}
9875 name : Backend
9976 runs-on : ubuntu-latest
10077 steps :
@@ -147,8 +124,6 @@ jobs:
147124
148125 build-python :
149126 name : Build Python
150- needs : pre-check
151- if : ${{ needs.pre-check.outputs.python_at_least != 'PYTHON_AT_LEAST' }}
152127 runs-on : ${{ matrix.os }}
153128 strategy :
154129 fail-fast : false # Do not stop when any job fails
@@ -228,4 +203,4 @@ jobs:
228203 working-directory : python-client
229204 env :
230205 PYTEST_XDIST_AUTO_NUM_WORKERS : ${{ matrix.os == 'windows-2019' && 1 || 2 }}
231- run : pdm run test
206+ run : pdm run test -m "slow"
0 commit comments