Skip to content

Commit

Permalink
github: add package source dir to coverage
Browse files Browse the repository at this point in the history
    - Add package source directory to the coverage call.
      Otherwise completely untested files not called in
      the unittests would slip through CI/CD pipeline.
    - Now completely untested files will be in the
      coverage report with 0% coverage.
  • Loading branch information
JochenSiegWork committed Aug 16, 2024
1 parent 634ecc4 commit 2ddba27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
- name: Run unit-tests
run: |
# Run only the core test suite in the tests directory.
coverage run -m unittest discover tests
coverage run --source=molpipeline -m unittest discover tests
# Create a coverage report. Fail if the coverage is below 85%. Exclude extra packages from the report.
coverage report --fail-under=85 --omit="*chemprop*","*/*chemprop*/*"
Expand All @@ -204,7 +204,7 @@ jobs:
- name: Run unit-tests for chemprop
run: |
# Run only the chemprop test suite.
coverage run -m unittest discover test_extras/test_chemprop
coverage run --source=molpipeline -m unittest discover test_extras/test_chemprop
# Create a coverage report. Fail if the coverage is below 85%. Include only chemprop files in the report.
coverage report --fail-under=85 --include="*chemprop*","*/*chemprop*/*"
Expand Down

0 comments on commit 2ddba27

Please sign in to comment.