-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,32 +236,26 @@ jobs: | |
run: | | ||
poetry install | ||
poetry run maturin develop | ||
- name: Test pyo3 bindings | ||
run: poetry run pytest | ||
- name: Run python tests with coverage instrumentation | ||
run: poetry run pytest --cov=./ --cov-report=xml | ||
- name: Upload coverage output artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: py-coverage | ||
path: coverage.xml | ||
|
||
coverage-py: | ||
name: Check Python coverage 🐍 | ||
name: Upload Python coverage 🐍 | ||
needs: [changes, tests-py, check-py] | ||
# Run only if there are changes in the relevant files and the check job passed or was skipped | ||
if: always() && !failure() && !cancelled() && needs.changes.outputs.python == 'true' && github.event_name != 'merge_group' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: mozilla-actions/[email protected] | ||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
python-version: '3.11' | ||
cache: 'poetry' | ||
- name: Build pyo3 bindings | ||
run: | | ||
poetry install | ||
poetry run maturin develop | ||
- name: Run python tests with coverage instrumentation | ||
run: poetry run pytest --cov=./ --cov-report=xml | ||
name: py-coverage | ||
path: coverage.xml | ||
- name: Upload python coverage to codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
|