Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ jobs:

- name: Run all tests except those involving obolibrary
if: matrix.mode != 'dandi-api' && matrix.mode != 'obolibrary-only' && matrix.mode != 'lowest-deps'
# Start coverage before pytest, which loads dandi's pytest plugin (and
# thus imports most of dandi) before pytest-cov would start it
run: |
python -m pytest -s -v -m "not obolibrary" --cov=dandi --cov-report=xml dandi
python -m coverage run -m pytest -s -v -m "not obolibrary" dandi
python -m coverage combine

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha -- I think we do call external dandi CLI , so likely we might benefit from what @asmacdo + mate dug up for con-duct and I added for datalad: https://github.com/datalad/datalad/pull/7952/changes#diff-834e9b406d74791ffbafaeec9cc894082cea9739bc347b6ff9f72312c92ebc79R1

which is to add

❯ head -n 3 ~datalad/datalad/.coveragerc
[run]
# also measure Python subprocesses: datalad CLI, special remotes, ...
patch = subprocess

so might boost coverage even more???

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first let's current run finish / merge may be to get this boost in ;)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes indeed, it might: #1953

python -m coverage xml

- name: Run tests against minimum declared dependency versions
if: matrix.mode == 'lowest-deps'
Expand All @@ -168,7 +172,9 @@ jobs:
if: matrix.mode == 'dandi-api'
run: |
export DANDI_TESTS_AUDIT_CSV=/tmp/audit.csv
python -m pytest -s -v --cov=dandi --cov-report=xml --dandi-api dandi
python -m coverage run -m pytest -s -v --dandi-api dandi
python -m coverage combine
python -m coverage xml
if [ ! -e /tmp/audit.csv ]
then echo Audit file not created
exit 1
Expand Down
Loading