Skip to content

Commit

Permalink
Upload to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
olekli committed Oct 17, 2024
1 parent a78566e commit a48d3cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/pytest-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: pytest

on:
push:
branches: [ main ] # Run on pushes to the main branch
branches: [ main ]
pull_request:
branches: [ main ] # Run on pull requests to the main branch
branches: [ main ]

jobs:
test:
Expand All @@ -17,30 +17,26 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # Specify your Python version here
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
poetry-version: 1.8.3 # Specify the Poetry version you need
poetry-version: 1.8.3

- name: Install dependencies
run: |
poetry install
- name: Run tests with coverage
run: |
poetry run pytest --cov=drresult # Adjust the path if necessary
poetry run pytest --cov=drresult
- name: Generate coverage report
run: |
poetry run coverage xml
poetry run coverage html
- name: Upload coverage report
uses: actions/upload-artifact@v3
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
name: coverage-report
path: |
htmlcov
coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![tests](https://github.com/olekli/drresult/actions/workflows/pytest-coverage.yml/badge.svg)
[![codecov](https://codecov.io/github/olekli/DrResult/branch/main/graph/badge.svg?token=WLSOABF6I6)](https://codecov.io/github/olekli/DrResult)

# DrResult

Expand Down

0 comments on commit a48d3cb

Please sign in to comment.