24 lines
593 B
YAML
24 lines
593 B
YAML
name: Test and coverage
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 2
|
|
- name: Set up Python 3.9
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt -r requirements.dev.txt
|
|
- name: Run tests and collect coverage
|
|
run: |
|
|
pytest --cov=src tests
|
|
coverage xml
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|