Skip to content

[pre-commit.ci] pre-commit autoupdate #128

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #128

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Ensure latest setuptools
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
python -m pip install tox
- name: Run linting
run: |
python -m pip --version
python -m tox --version
python -m tox -e lint
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Ensure latest setuptools
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
python -m pip install tox
- name: Build docs
run: |
python -m pip --version
python -m tox --version
python -m tox -e docs
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
- '3.10'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox tox-py codecov
- name: Run tox targets for ${{ matrix.python-version }}
run: |
tox --py current
- name: Coverage reporting
run: |
coverage combine
codecov