Skip to content

Test

Test #51

Workflow file for this run

name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
release:
types: [created]
workflow_dispatch:
jobs:
build_and_test:
name: Install and test
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade tox
- name: Test with tox with coverage
run: tox -- --cov --cov-report=xml -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: py${{ matrix.python-version }}
fail_ci_if_error: true
verbose: true
- name: Install docs dependencies
working-directory: docs
run: pip install --requirement requirements.txt
- name: Build docs
working-directory: docs
run: make html