Skip to content

Commit e12387f

Browse files
committed
imline
1 parent 725cf5e commit e12387f

1 file changed

Lines changed: 38 additions & 57 deletions

File tree

.github/workflows/sonarcloud.yml

Lines changed: 38 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- master
77
pull_request:
88
types: [labeled, opened, synchronize, reopened, unlabeled]
9-
env:
10-
SCRIPT_FOLDER: ./.github/scripts
11-
RUN_TEST: source ../.github/scripts/run_test.sh
129

1310
jobs:
1411
sonarcloud:
@@ -28,29 +25,9 @@ jobs:
2825

2926
- uses: actions/setup-python@v5
3027
with:
31-
python-version: |
32-
3.10
33-
3.11
28+
python-version: ${{ matrix.python-version }}
3429
cache: 'poetry'
3530

36-
- name: Cache global Poetry virtualenvs
37-
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' }}-
44-
45-
uses: actions/cache@v4
46-
with:
47-
path: ~/.cache/pypoetry/virtualenvs
48-
key: ${{ runner.os }}-poetry-venv-${{ matrix.python-version }}-${{ hashFiles('<project>/poetry.lock') }}
49-
restore-keys: |
50-
${{ runner.os }}-poetry-venv-${{ matrix.python-version }}-
51-
52-
53-
5431
- name: Set up AWS credentials
5532
env:
5633
AWS_ACCESS_KEY_ID: "FOOBARKEY"
@@ -69,44 +46,48 @@ jobs:
6946
poetry run coverage run -m unittest discover || echo "filenameprocessor tests failed" >> ../failed_tests.txt
7047
poetry run coverage xml -o ../sonarcloud-coverage-filenameprocessor-coverage.xml
7148
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
49+
- name: Run unittest with recordprocessor-coverage
50+
working-directory: recordprocessor
51+
id: recordprocessor
52+
continue-on-error: true
53+
run: |
54+
poetry env use 3.10
55+
poetry install
56+
poetry run coverage run -m unittest discover || echo "recordprocessor tests failed" >> ../failed_tests.txt
57+
poetry run coverage xml -o ../sonarcloud-coverage-recordprocessor-coverage.xml
58+
59+
# This step is redundant - all of these tests will be run in the backend step below
60+
- name: Run unittest with recordforwarder-coverage
61+
working-directory: backend
62+
id: recordforwarder
63+
continue-on-error: true
64+
run: |
65+
poetry env use 3.11
66+
poetry install
67+
poetry run coverage run -m unittest discover -s "./tests" -p "*batch*.py" || echo "recordforwarder tests failed" >> ../failed_tests.txt
68+
poetry run coverage xml -o ../sonarcloud-coverage-recordforwarder-coverage.xml
9269
9370
- name: Run unittest with coverage-ack-lambda
94-
if: matrix.python-version == '3.10'
9571
working-directory: ack_backend
9672
id: acklambda
9773
continue-on-error: true
9874
run: |
99-
$RUN_TEST 3.10 "ack-lambda" "ack-lambda.xml"
75+
poetry env use 3.10
76+
poetry install
77+
poetry run coverage run -m unittest discover || echo "ack-lambda tests failed" >> ../failed_tests.txt
78+
poetry run coverage xml -o ../sonarcloud-coverage-ack-lambda.xml
10079
10180
- name: Run unittest with coverage-delta
102-
if: matrix.python-version == '3.11'
10381
working-directory: delta_backend
10482
id: delta
10583
env:
10684
PYTHONPATH: delta_backend/src:delta_backend/tests
10785
continue-on-error: true
10886
run: |
109-
$RUN_TEST 3.11 delta_backend delta.xml
87+
poetry env use 3.11
88+
poetry install
89+
poetry run coverage run -m unittest discover || echo "delta tests failed" >> ../failed_tests.txt
90+
poetry run coverage xml -o ../sonarcloud-coverage-delta.xml
11091
11192
- name: Run unittest with coverage-fhir-api
11293
working-directory: backend
@@ -118,15 +99,15 @@ jobs:
11899
poetry run coverage run -m unittest discover || echo "fhir-api tests failed" >> ../failed_tests.txt
119100
poetry run coverage xml -o ../sonarcloud-coverage.xml
120101
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
102+
- name: Run unittest with coverage-mesh-processor
103+
working-directory: mesh_processor
104+
id: meshprocessor
105+
continue-on-error: true
106+
run: |
107+
poetry env use 3.10
108+
poetry install
109+
poetry run coverage run -m unittest discover || echo "mesh_processor tests failed" >> ../failed_tests.txt
110+
poetry run coverage xml -o ../sonarcloud-mesh_processor-coverage.xml
130111
131112
- name: Run Test Failure Summary
132113
id: check_failure

0 commit comments

Comments
 (0)