Skip to content

Commit

Permalink
Merge pull request #1 from pt1243/test_codecov
Browse files Browse the repository at this point in the history
add codecov
  • Loading branch information
pt1243 authored Sep 18, 2023
2 parents 5197816 + dfd4f61 commit 73e9e16
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Upload coverage

on:
pull_request:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
name: Generate and upload coverage
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov coverage
- name: Run tests and generate coverage report
run: pytest
- name: Upload coverage report
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build-backend = "setuptools.build_meta"
packages = ["my_package"]

[tool.pytest.ini_options]
addopts = "--cov=my_package --cov-append"
addopts = "--cov=my_package --cov-report=term-missing --cov-append"
testpaths = [
"tests",
]
Expand Down

0 comments on commit 73e9e16

Please sign in to comment.