88 types : [labeled, opened, synchronize, reopened, unlabeled]
99env :
1010 SCRIPT_FOLDER : ./.github/scripts
11- TEST_SCRIPT : source ../.github/scripts/run_test.sh
11+ RUN_TEST : source ../.github/scripts/run_test.sh
1212
1313jobs :
1414 sonarcloud :
1515 name : SonarCloud
1616 runs-on : ubuntu-latest
17+ strategy :
18+ matrix :
19+ python-version : ['3.10', '3.11']
1720
21+
1822 steps :
1923 - uses : actions/checkout@v4
2024 with :
2529
2630 - uses : actions/setup-python@v5
2731 with :
28- python-version : |
29- 3.10
30- 3.11
32+ python-version : ${{ matrix.python-version }}
3133 cache : ' poetry'
3234
3335 - name : Set up AWS credentials
@@ -46,109 +48,88 @@ jobs:
4648 run : poetry config virtualenvs.in-project true
4749
4850 - name : Cache Poetry virtualenv (filenameprocessor)
51+ if : matrix.python-version == '3.10'
4952 uses : actions/cache@v4
5053 with :
5154 path : ./filenameprocessor/.venv
52- key : ${{ runner.os }}-venv-filenameprocessor -${{ hashFiles('filenameprocessor/poetry.lock') }}
55+ key : ${{ runner.os }}-venv-fp-py3.10 -${{ hashFiles('filenameprocessor/poetry.lock') }}
5356 restore-keys : |
54- ${{ runner.os }}-venv-filenameprocessor -
57+ ${{ runner.os }}-venv-fp-py3.10 -
5558
5659 - name : Cache Poetry virtualenv (recordprocessor)
60+ if : matrix.python-version == '3.10'
5761 uses : actions/cache@v4
5862 with :
5963 path : ./recordprocessor/.venv
60- key : ${{ runner.os }}-venv-recordprocessor -${{ hashFiles('recordprocessor/poetry.lock') }}
64+ key : ${{ runner.os }}-venv-rp-py3.10 -${{ hashFiles('recordprocessor/poetry.lock') }}
6165 restore-keys : |
62- ${{ runner.os }}-venv-recordprocessor -
66+ ${{ runner.os }}-venv-rp-py3.10 -
6367
6468 - name : Cache Poetry virtualenv (recordforwarder)
69+ if : matrix.python-version == '3.11'
6570 uses : actions/cache@v4
6671 with :
6772 path : ./backend/.venv
68- key : ${{ runner.os }}-venv-backend -${{ hashFiles('backend/poetry.lock') }}
73+ key : ${{ runner.os }}-venv-be-py3.11 -${{ hashFiles('backend/poetry.lock') }}
6974 restore-keys : |
70- ${{ runner.os }}-venv-backend -
75+ ${{ runner.os }}-venv-be-py3.11 -
7176
7277 - name : Cache Poetry virtualenv (ack_backend)
78+ if : matrix.python-version == '3.10'
7379 uses : actions/cache@v4
7480 with :
7581 path : ./ack_backend/.venv
76- key : ${{ runner.os }}-venv-ack_backend -${{ hashFiles('ack_backend/poetry.lock') }}
82+ key : ${{ runner.os }}-venv-ack-py3.10 -${{ hashFiles('ack_backend/poetry.lock') }}
7783 restore-keys : |
78- ${{ runner.os }}-venv-ack_backend -
84+ ${{ runner.os }}-venv-ack-py3.10 -
7985
8086 - name : Cache Poetry virtualenv (delta_backend)
87+ if : matrix.python-version == '3.11'
8188 uses : actions/cache@v4
8289 with :
8390 path : ./delta_backend/.venv
84- key : ${{ runner.os }}-venv-delta_backend -${{ hashFiles('delta_backend/poetry.lock') }}
91+ key : ${{ runner.os }}-venv-delta-py3.11 -${{ hashFiles('delta_backend/poetry.lock') }}
8592 restore-keys : |
86- ${{ runner.os }}-venv-delta_backend -
93+ ${{ runner.os }}-venv-delta-py3.11 -
8794
8895 - name : Run unittest with filenameprocessor-coverage (S)
96+ if : matrix.python-version == '3.10'
8997 working-directory : filenameprocessor
9098 id : filenameprocessor
9199 continue-on-error : true
92- run : |
93- $TEST_SCRIPT 3.10 \
94- "filenameprocessor" \
95- "filenameprocessor-coverage.xml"
100+ run : $RUN_TEST 3.10 filenameprocessor filenameprocessor-coverage.xml
96101
97102 - name : Run unittest with recordprocessor-coverage (s)
103+ if : matrix.python-version == '3.10'
98104 working-directory : recordprocessor
99105 id : recordprocessor
100106 continue-on-error : true
101- run : |
102- $TEST_SCRIPT 3.10 \
103- "recordprocessor" \
104- "recordprocessor-coverage.xml"
107+ run : $RUN_TEST 3.10 recordprocessor recordprocessor-coverage.xml
105108
106109 - name : Run unittest with recordforwarder-coverage
110+ if : matrix.python-version == '3.11'
107111 working-directory : backend
108112 id : recordforwarder
109113 continue-on-error : true
110114 run : |
111- $TEST_SCRIPT 3.11 \
112- "recordforwarder" \
113- "recordforwarder-coverage.xml"
115+ poetry config virtualenvs.in-project true
116+ $RUN_TEST 3.11 recordforwarder recordforwarder-coverage.xml
114117
115118 - name : Run unittest with coverage-ack-lambda
119+ if : matrix.python-version == '3.10'
116120 working-directory : ack_backend
117121 id : acklambda
118122 continue-on-error : true
119- run : |
120- $TEST_SCRIPT 3.10 \
121- "ack-lambda" \
122- "ack-lambda.xml"
123+ run : $RUN_TEST 3.10 ack-lambda ack-lambda.xml
123124
124125 - name : Run unittest with coverage-delta
126+ if : matrix.python-version == '3.11'
125127 working-directory : delta_backend
126128 id : delta
127129 env :
128130 PYTHONPATH : delta_backend/src:delta_backend/tests
129131 continue-on-error : true
130- run : |
131- $TEST_SCRIPT 3.11 \
132- "delta_backend" \
133- "delta.xml"
134-
135- # - name: Run unittest with coverage-fhir-api
136- # working-directory: backend
137- # id: fhirapi
138- # continue-on-error: true
139- # run: |
140- # $TEST_SCRIPT 3.11 \
141- # "fhir-api" \
142- # "fhir-api.xml"
143-
144- # - name: Run unittest with coverage-mesh-processor
145- # working-directory: mesh_processor
146- # id: meshprocessor
147- # continue-on-error: true
148- # run: |
149- # $TEST_SCRIPT 3.10 \
150- # "mesh_processor" \
151- # "mesh_processor-coverage.xml"
132+ run : $RUN_TEST 3.11 delta_backend delta.xml
152133
153134 - name : Run Test Failure Summary
154135 id : check_failure
0 commit comments