Skip to content

Commit

Permalink
Enable coverage collection
Browse files Browse the repository at this point in the history
  • Loading branch information
lbianchi-lbl committed May 1, 2024
1 parent a834950 commit 805fa98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jobs:
os-version: ubuntu-22.04
- os: win64
os-version: windows-2022
- install-mode: dev
python-version: "3.11" # choice of Python version is arbitrary among those in matrix
coverage: "true"
mpi: "true"

steps:
- if: matrix.install-mode == 'dev'
uses: actions/checkout@v4
Expand All @@ -78,6 +83,10 @@ jobs:
- name: Set up IDAES solvers
run: |
idaes get-extensions --verbose
- if: matrix.coverage
name: Enable coverage for pytest
run: |
echo PYTEST_ADDOPTS="$PYTEST_ADDOPTS --cov-report=xml" >> $GITHUB_ENV
- name: Run pytest
run: |
pip install pytest # ensure pytest is installed (should do nothing if already present from requirements-dev.txt)
Expand Down
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
black==24.3.0
pytest-cov
coverage
--editable .[testing,ray]
watertap @ git+https://github.com/watertap-org/watertap@main

0 comments on commit 805fa98

Please sign in to comment.