-
Notifications
You must be signed in to change notification settings - Fork 0
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
46 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Pytest Coverage Report | ||
|
||
on: | ||
push: | ||
branches: [ main ] # Run on pushes to the main branch | ||
pull_request: | ||
branches: [ main ] # Run on pull requests to the main branch | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # Specify your Python version here | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
poetry-version: 1.8.3 # Specify the Poetry version you need | ||
|
||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Run tests with coverage | ||
run: | | ||
poetry run pytest --cov=drresult # Adjust the path if necessary | ||
- name: Generate coverage report | ||
run: | | ||
poetry run coverage xml | ||
poetry run coverage html | ||
- name: Upload coverage report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-report | ||
path: | | ||
htmlcov | ||
coverage.xml |