Skip to content

Added code coverage workflow #1

Added code coverage workflow

Added code coverage workflow #1

Workflow file for this run

name: Test Coverage

Check failure on line 1 in .github/workflows/test-coverage.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test-coverage.yaml

Invalid workflow file

`push pull_request` is not a valid event name
on:
push
pull_request
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '1.8.3'
- name: Install dependencies
run: poetry install
- name: Run tests coverage
run: |
poetry run pytest
poetry run coverage report
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true