ci: Add tests to GitHub Actions

This commit is contained in:
2022-04-09 23:30:06 +03:00
parent 559f6878f7
commit 9b8df89fc5
2 changed files with 94 additions and 0 deletions

24
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
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