This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
tests coverage #1140
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests coverage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: "0 8 * * *" | |
jobs: | |
coverage_report: | |
name: test ${{ matrix.py }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- Ubuntu | |
py: | |
- "3.8" | |
steps: | |
- name: Setup python for test coverage ${{ matrix.py }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.py }} | |
- uses: actions/checkout@v2 | |
- name: Generate coverage report | |
run: | | |
pip install -r requirements-dev.txt | |
pip install -e . | |
pip install pytest-cov | |
pytest --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2.1.0 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} |