1414 sonarcloud :
1515 name : SonarCloud
1616 runs-on : ubuntu-latest
17- strategy :
18- matrix :
19- include :
20- - project : filenameprocessor
21- python-version : " 3.10"
22- - project : recordprocessor
23- python-version : " 3.10"
24- - project : backend
25- python-version : " 3.11"
26- test-name : recordforwarder
27- coverage-file : recordforwarder-coverage.xml
28- - project : ack_backend
29- python-version : " 3.10"
30- test-name : ack-lambda
31- coverage-file : ack-lambda.xml
32- - project : delta_backend
33- python-version : " 3.11"
34- test-name : delta_backend
35- coverage-file : delta.xml
36- # Add more projects as needed
3717
3818 steps :
3919 - uses : actions/checkout@v4
@@ -45,10 +25,11 @@ jobs:
4525
4626 - uses : actions/setup-python@v5
4727 with :
48- python-version : ${{ matrix.python-version }}
28+ python-version : |
29+ "3.10"
30+ "3.11"
4931 cache : ' poetry'
5032
51-
5233 - name : Set up AWS credentials
5334 env :
5435 AWS_ACCESS_KEY_ID : " FOOBARKEY"
@@ -63,21 +44,53 @@ jobs:
6344
6445 - name : Set Poetry to use in-project venvs
6546 run : poetry config virtualenvs.in-project true
66-
67- - name : Cache Poetry virtualenv
47+
48+ - name : Cache Poetry virtualenv (filenameprocessor)
49+ uses : actions/cache@v4
50+ with :
51+ path : ./filenameprocessor/.venv
52+ key : ${{ runner.os }}-venv-fp-py3.10-${{ hashFiles('filenameprocessor/poetry.lock') }}
53+ restore-keys : |
54+ ${{ runner.os }}-venv-fp-py3.10-
55+
56+ - name : Cache Poetry virtualenv (recordprocessor)
57+ uses : actions/cache@v4
58+ with :
59+ path : ./recordprocessor/.venv
60+ key : ${{ runner.os }}-venv-rp-py3.10-${{ hashFiles('recordprocessor/poetry.lock') }}
61+ restore-keys : |
62+ ${{ runner.os }}-venv-rp-py3.10-
63+
64+ - name : Cache Poetry virtualenv (recordforwarder)
6865 uses : actions/cache@v4
6966 with :
70- path : ./${{ matrix.project }} /.venv
71- key : ${{ runner.os }}-venv-${{ matrix.project }}-py${{ matrix.python-version }}- ${{ hashFiles(format('{0} /poetry.lock', matrix.project) ) }}
67+ path : ./backend /.venv
68+ key : ${{ runner.os }}-venv-be-py3.11- ${{ hashFiles('backend /poetry.lock') }}
7269 restore-keys : |
73- ${{ runner.os }}-venv-${{ matrix.project }}-py${{ matrix.python-version }}-
70+ ${{ runner.os }}-venv-be-py3.11-
71+
72+ - name : Cache Poetry virtualenv (ack_backend)
73+ uses : actions/cache@v4
74+ with :
75+ path : ./ack_backend/.venv
76+ key : ${{ runner.os }}-venv-ack-py3.10-${{ hashFiles('ack_backend/poetry.lock') }}
77+ restore-keys : |
78+ ${{ runner.os }}-venv-ack-py3.10-
79+
80+ - name : Cache Poetry virtualenv (delta_backend)
81+ uses : actions/cache@v4
82+ with :
83+ path : ./delta_backend/.venv
84+ key : ${{ runner.os }}-venv-delta-py3.11-${{ hashFiles('delta_backend/poetry.lock') }}
85+ restore-keys : |
86+ ${{ runner.os }}-venv-delta-py3.11-
7487
7588 - name : Run unittest with filenameprocessor-coverage (S)
7689 working-directory : filenameprocessor
7790 id : filenameprocessor
7891 continue-on-error : true
7992 run : |
80- $TEST_SCRIPT 3.10 \
93+ $TEST_SCRIPT " 3.10" \
8194 "filenameprocessor" \
8295 "filenameprocessor-coverage.xml"
8396
8699 id : recordprocessor
87100 continue-on-error : true
88101 run : |
89- $TEST_SCRIPT 3.10 \
102+ $TEST_SCRIPT " 3.10" \
90103 "recordprocessor" \
91104 "recordprocessor-coverage.xml"
92105
95108 id : recordforwarder
96109 continue-on-error : true
97110 run : |
98- $TEST_SCRIPT 3.11 \
111+ $TEST_SCRIPT " 3.11" \
99112 "recordforwarder" \
100113 "recordforwarder-coverage.xml"
101114
@@ -104,7 +117,7 @@ jobs:
104117 id : acklambda
105118 continue-on-error : true
106119 run : |
107- $TEST_SCRIPT 3.10 \
120+ $TEST_SCRIPT " 3.10" \
108121 "ack-lambda" \
109122 "ack-lambda.xml"
110123
@@ -115,28 +128,10 @@ jobs:
115128 PYTHONPATH : delta_backend/src:delta_backend/tests
116129 continue-on-error : true
117130 run : |
118- $TEST_SCRIPT 3.11 \
131+ $TEST_SCRIPT " 3.11" \
119132 "delta_backend" \
120133 "delta.xml"
121134
122- # - name: Run unittest with coverage-fhir-api
123- # working-directory: backend
124- # id: fhirapi
125- # continue-on-error: true
126- # run: |
127- # $TEST_SCRIPT 3.11 \
128- # "fhir-api" \
129- # "fhir-api.xml"
130-
131- # - name: Run unittest with coverage-mesh-processor
132- # working-directory: mesh_processor
133- # id: meshprocessor
134- # continue-on-error: true
135- # run: |
136- # $TEST_SCRIPT 3.10 \
137- # "mesh_processor" \
138- # "mesh_processor-coverage.xml"
139-
140135 - name : Run Test Failure Summary
141136 id : check_failure
142137 run : |
0 commit comments