2021-07-04 07:27:18 +00:00
|
|
|
name: Run Tests
|
|
|
|
on: push
|
|
|
|
jobs:
|
2021-07-05 08:04:45 +00:00
|
|
|
python:
|
2021-07-04 07:27:18 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python: ["3.6", "3.7", "3.8", "3.9"]
|
|
|
|
env:
|
|
|
|
PYTHON_VERSION: ${{matrix.python}}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python ${{matrix.python}}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{matrix.python}}
|
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -e .[testing]
|
|
|
|
- name: Run pytest
|
|
|
|
run: |
|
|
|
|
pytest --cache-clear --cov=./ --cov-report=xml --cov-report=html
|
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
files: ./coverage.xml
|
|
|
|
env_vars: RUNNER_OS,PYTHON_VERSION,CI,GITHUB_SHA,RUNNER_OS,GITHUB_RUN_ID
|