Skip to content

Commit e6a7284

Browse files
committed
debug coverage.
1 parent b051aa3 commit e6a7284

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ jobs:
8686
poetry install
8787
poetry run coverage run -m unittest discover || echo "delta tests failed" >> ../failed_tests.txt
8888
poetry run coverage xml -o ../delta-coverage.xml
89+
cat ../delta-coverage.xml
8990
9091
- name: Run unittest with coverage-fhir-api
9192
working-directory: backend
@@ -125,18 +126,10 @@ jobs:
125126
PYTHONPATH: ${{ env.SHARED_PATH }}
126127
continue-on-error: true
127128
run: |
128-
echo "shared coverage - Current directory: $(pwd)"
129129
poetry env use 3.11
130130
poetry install
131-
poetry run coverage run -m unittest discover || echo "shared tests failed" >> ../../failed_tests.txt
131+
poetry run coverage run --source=src -m unittest discover -s tests -p "test_*.py" -v || echo "shared tests failed" >> ../../failed_tests.txt
132132
poetry run coverage xml -o ../../shared-coverage.xml
133-
ls ../../shared-coverage.xml
134-
# show director of ../.. as absolute path
135-
echo "Parent directory of shared-coverage.xml: $(pwd)/../../"
136-
#check files created
137-
if [ ! -f ../../shared-coverage.xml ]; then
138-
echo "shared-coverage.xml not found"
139-
fi
140133
141134
- name: Run unittest with id_sync
142135
working-directory: lambdas/id_sync
@@ -145,15 +138,10 @@ jobs:
145138
PYTHONPATH: ${{ env.LAMBDA_PATH }}/id_sync/src:${{ env.LAMBDA_PATH }}/id_sync/tests:${{ env.SHARED_PATH }}
146139
continue-on-error: true
147140
run: |
148-
echo "id_sync coverage - Current directory: $(pwd)"
149141
poetry env use 3.11
150142
poetry install
151143
poetry run coverage run -m unittest discover || echo "id_sync tests failed" >> ../../failed_tests.txt
152144
poetry run coverage xml -o ../../id_sync-coverage.xml
153-
#check files created
154-
if [ ! -f ../../id_sync-coverage.xml ]; then
155-
echo "id_sync-coverage.xml not found, exiting with error"
156-
fi
157145
158146
- name: Run Test Failure Summary
159147
id: check_failure

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@ openapi.json
2929
!**/.vscode/settings.json.default
3030

3131
devtools/volume/
32-
backend/tests/.coverage
33-
redis_sync/.vscode/settings.json.default
34-
lambdas/shared/.coverage
32+
**/.coverage
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"python.analysis.extraPaths": [
3+
"./src"
4+
],
5+
"python.testing.unittestArgs": [
6+
"-v",
7+
"-s",
8+
"./",
9+
"-p",
10+
"test_*.py"
11+
],
12+
"python.testing.pytestEnabled": false,
13+
"python.testing.unittestEnabled": true,
14+
"pylint.args": [
15+
"--init-hook",
16+
"import sys; sys.path.append('./src')"
17+
]
18+
}

terraform/id_sync_lambda.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ output "debug_build_paths" {
3333
output "debug_file_listing" {
3434
value = {
3535
shared_files_sample = slice(local.shared_files, 0, min(5, length(local.shared_files)))
36-
id_sync_files_sample = slice(local.id_sync_lambda_files, 0, min(5, length(local.id_sync_lambda_files)))
3736
}
3837
}
3938

0 commit comments

Comments
 (0)