Skip to content

Commit

Permalink
Add github workflow for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
olekli committed Oct 15, 2024
1 parent 47c89e4 commit 6b25379
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pytest-coverage.yml
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

0 comments on commit 6b25379

Please sign in to comment.