Skip to content

Commit

Permalink
ci: fix up testing of python code
Browse files Browse the repository at this point in the history
Using pull_request_target causes us to run code tests against main since
that's the default code checked out. Don't depend on pyproject.toml
configuring pytest to generate code coverage by always specifying the
flag.
  • Loading branch information
cardoe committed Sep 17, 2024
1 parent 76d43bf commit d2cf39e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths:
- "python/**"
- ".github/workflows/code-test.yaml"
pull_request_target:
pull_request:
paths:
- "python/**"
- ".github/workflows/code-test.yaml"
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
cache: "poetry"
- run: poetry install --sync --with test
- run: poetry build
- run: "poetry run pytest --cov-report xml:coverage.xml"
- run: "poetry run pytest --cov --cov-report xml:coverage.xml"
- uses: orgoro/coverage@3f13a558c5af7376496aa4848bf0224aead366ac # v3.2
with:
coverageFile: python/${{ matrix.project }}/coverage.xml
Expand Down

0 comments on commit d2cf39e

Please sign in to comment.