Skip to content

Codecov inclusion

Codecov inclusion #12

Workflow file for this run

name: "Run Tests"
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install codecov
pip install pytest-cov
pip install .
- name: Run tests
run: |
pytest --cov=dlordinal --cov-report=xml
codecov:
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'codecov actions') }}
needs: tests
runs-on: ubuntu-22.04
steps:
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}