1616 runs-on : ubuntu-latest
1717 strategy :
1818 matrix :
19- python-version : ['3.10 ', '3.11 ']
19+ python-version : ['3.11 ', '3.10 ']
2020
21-
2221 steps :
2322 - uses : actions/checkout@v4
2423 with :
@@ -29,98 +28,75 @@ jobs:
2928
3029 - uses : actions/setup-python@v5
3130 with :
32- python-version : ${{ matrix.python-version }}
31+ python-version : |
32+ 3.10
33+ 3.11
3334 cache : ' poetry'
3435
35- - name : Set up AWS credentials
36- env :
37- AWS_ACCESS_KEY_ID : " FOOBARKEY"
38- AWS_SECRET_ACCESS_KEY : " FOOBARSECRET"
39- run : |
40- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
41- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
42-
43- - name : Chmod .github directory
44- run : |
45- chmod +x $SCRIPT_FOLDER/*.sh
36+ - name : Cache global Poetry virtualenvs
4637
47- - name : Set Poetry to use in-project venvs
48- run : poetry config virtualenvs.in-project true
38+ # uses: actions/cache@v4
39+ # with:
40+ # path: ~/.cache/pypoetry/virtualenvs
41+ # key: ${{ runner.os }}-poetry-global-venv-py${{ matrix.python-version || 'all' }}-${{ hashFiles('**/poetry.lock') }}
42+ # restore-keys: |
43+ # ${{ runner.os }}-poetry-global-venv-py${{ matrix.python-version || 'all' }}-
4944
50- - name : Cache Poetry virtualenv (filenameprocessor)
51- if : matrix.python-version == '3.10'
5245 uses : actions/cache@v4
5346 with :
54- path : ./filenameprocessor/.venv
55- key : ${{ runner.os }}-venv-fp-py3.10- ${{ hashFiles('filenameprocessor /poetry.lock') }}
47+ path : ~/.cache/pypoetry/virtualenvs
48+ key : ${{ runner.os }}-poetry- venv-${{ matrix.python-version }}- ${{ hashFiles('<project> /poetry.lock') }}
5649 restore-keys : |
57- ${{ runner.os }}-venv-fp-py3.10 -
50+ ${{ runner.os }}-poetry- venv-${{ matrix.python-version }} -
5851
59- - name : Cache Poetry virtualenv (recordprocessor)
60- if : matrix.python-version == '3.10'
61- uses : actions/cache@v4
62- with :
63- path : ./recordprocessor/.venv
64- key : ${{ runner.os }}-venv-rp-py3.10-${{ hashFiles('recordprocessor/poetry.lock') }}
65- restore-keys : |
66- ${{ runner.os }}-venv-rp-py3.10-
6752
68- - name : Cache Poetry virtualenv (recordforwarder)
69- if : matrix.python-version == '3.11'
70- uses : actions/cache@v4
71- with :
72- path : ./backend/.venv
73- key : ${{ runner.os }}-venv-be-py3.11-${{ hashFiles('backend/poetry.lock') }}
74- restore-keys : |
75- ${{ runner.os }}-venv-be-py3.11-
76-
77- - name : Cache Poetry virtualenv (ack_backend)
78- if : matrix.python-version == '3.10'
79- uses : actions/cache@v4
80- with :
81- path : ./ack_backend/.venv
82- key : ${{ runner.os }}-venv-ack-py3.10-${{ hashFiles('ack_backend/poetry.lock') }}
83- restore-keys : |
84- ${{ runner.os }}-venv-ack-py3.10-
8553
86- - name : Cache Poetry virtualenv (delta_backend)
87- if : matrix.python-version == '3.11'
88- uses : actions/cache@v4
89- with :
90- path : ./delta_backend/.venv
91- key : ${{ runner.os }}-venv-delta-py3.11-${{ hashFiles('delta_backend/poetry.lock') }}
92- restore-keys : |
93- ${{ runner.os }}-venv-delta-py3.11-
94-
95- - name : Run unittest with filenameprocessor-coverage (S)
96- if : matrix.python-version == '3.10'
97- working-directory : filenameprocessor
98- id : filenameprocessor
99- continue-on-error : true
100- run : $RUN_TEST 3.10 filenameprocessor filenameprocessor-coverage.xml
101-
102- - name : Run unittest with recordprocessor-coverage (s)
103- if : matrix.python-version == '3.10'
104- working-directory : recordprocessor
105- id : recordprocessor
106- continue-on-error : true
107- run : $RUN_TEST 3.10 recordprocessor recordprocessor-coverage.xml
108-
109- - name : Run unittest with recordforwarder-coverage
110- if : matrix.python-version == '3.11'
111- working-directory : backend
112- id : recordforwarder
113- continue-on-error : true
54+ - name : Set up AWS credentials
55+ env :
56+ AWS_ACCESS_KEY_ID : " FOOBARKEY"
57+ AWS_SECRET_ACCESS_KEY : " FOOBARSECRET"
11458 run : |
115- poetry config virtualenvs.in-project true
116- $RUN_TEST 3.11 recordforwarder recordforwarder-coverage.xml
59+ aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
60+ aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
61+
62+ # - name: Run unittest with filenameprocessor-coverage
63+ # working-directory: filenameprocessor
64+ # id: filenameprocessor
65+ # continue-on-error: true
66+ # run: |
67+ # poetry env use 3.10
68+ # poetry install
69+ # poetry run coverage run -m unittest discover || echo "filenameprocessor tests failed" >> ../failed_tests.txt
70+ # poetry run coverage xml -o ../sonarcloud-coverage-filenameprocessor-coverage.xml
71+
72+ # - name: Run unittest with recordprocessor-coverage
73+ # working-directory: recordprocessor
74+ # id: recordprocessor
75+ # continue-on-error: true
76+ # run: |
77+ # poetry env use 3.10
78+ # poetry install
79+ # poetry run coverage run -m unittest discover || echo "recordprocessor tests failed" >> ../failed_tests.txt
80+ # poetry run coverage xml -o ../sonarcloud-coverage-recordprocessor-coverage.xml
81+
82+ # # This step is redundant - all of these tests will be run in the backend step below
83+ # - name: Run unittest with recordforwarder-coverage
84+ # working-directory: backend
85+ # id: recordforwarder
86+ # continue-on-error: true
87+ # run: |
88+ # poetry env use 3.11
89+ # poetry install
90+ # poetry run coverage run -m unittest discover -s "./tests" -p "*batch*.py" || echo "recordforwarder tests failed" >> ../failed_tests.txt
91+ # poetry run coverage xml -o ../sonarcloud-coverage-recordforwarder-coverage.xml
11792
11893 - name : Run unittest with coverage-ack-lambda
11994 if : matrix.python-version == '3.10'
12095 working-directory : ack_backend
12196 id : acklambda
12297 continue-on-error : true
123- run : $RUN_TEST 3.10 ack-lambda ack-lambda.xml
98+ run : |
99+ $RUN_TEST 3.10 "ack-lambda" "ack-lambda.xml"
124100
125101 - name : Run unittest with coverage-delta
126102 if : matrix.python-version == '3.11'
@@ -129,7 +105,28 @@ jobs:
129105 env :
130106 PYTHONPATH : delta_backend/src:delta_backend/tests
131107 continue-on-error : true
132- run : $RUN_TEST 3.11 delta_backend delta.xml
108+ run : |
109+ $RUN_TEST 3.11 delta_backend delta.xml
110+
111+ # - name: Run unittest with coverage-fhir-api
112+ # working-directory: backend
113+ # id: fhirapi
114+ # continue-on-error: true
115+ # run: |
116+ # poetry env use 3.11
117+ # poetry install
118+ # poetry run coverage run -m unittest discover || echo "fhir-api tests failed" >> ../failed_tests.txt
119+ # poetry run coverage xml -o ../sonarcloud-coverage.xml
120+
121+ # - name: Run unittest with coverage-mesh-processor
122+ # working-directory: mesh_processor
123+ # id: meshprocessor
124+ # continue-on-error: true
125+ # run: |
126+ # poetry env use 3.10
127+ # poetry install
128+ # poetry run coverage run -m unittest discover || echo "mesh_processor tests failed" >> ../failed_tests.txt
129+ # poetry run coverage xml -o ../sonarcloud-mesh_processor-coverage.xml
133130
134131 - name : Run Test Failure Summary
135132 id : check_failure
@@ -151,4 +148,4 @@ jobs:
151148 uses : SonarSource/sonarqube-scan-action@master
152149 env :
153150 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
154- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
151+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
0 commit comments