Skip to content

Commit c4a084a

Browse files
author
Charles Larivier
committed
feat: add codecov to Github workflow
1 parent 219b321 commit c4a084a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/python-package.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,31 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
python-version: ["3.8", "3.9", "3.10"]
22+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
23+
os: [ubuntu-latest, macos-latest, windows-latest]
2324

2425
steps:
2526
- uses: actions/checkout@v2
27+
2628
- name: Set up Python ${{ matrix.python-version }}
2729
uses: actions/setup-python@v2
2830
with:
2931
python-version: ${{ matrix.python-version }}
32+
3033
- name: Install dependencies
3134
run: |
3235
python -m pip install --upgrade pip
3336
python -m pip install pipenv
34-
pipenv install --deploy
37+
pipenv install --deploy --dev
38+
3539
- name: Test with pytest
3640
run: |
37-
pipenv run pytest
41+
pipenv run pytest --cov=./ --cov-report=xml
42+
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v2
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
directory: ./coverage/reports/
48+
env_vars: OS,PYTHON
49+
fail_ci_if_error: true

0 commit comments

Comments
 (0)