Skip to content

Commit

Permalink
Update codecov.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
keke125 authored Nov 29, 2023
1 parent a7f13c3 commit cbde3ed
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
name: Example workflow for Codecov
on: [push]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
PYTHON: '3.10'
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.10
- name: Generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage1.xml,./coverage2.xml,!./cache
flags: unittests
name: codecov-umbrella
verbose: true

0 comments on commit cbde3ed

Please sign in to comment.