potodo/.github/workflows/tests.yml

40 lines
1.0 KiB
YAML

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Run tox on ${{ matrix.os }} for Python ${{ matrix.tox.py_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
tox:
- py_version: '3.7'
env: py37
- py_version: '3.8'
env: py38
- py_version: '3.9'
env: py39
- py_version: '3.10'
env: py310,flake8,mypy,black
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.tox.py_version }}
- uses: actions/cache@v2
with:
path: .tox
key: ${{ matrix.os }}-${{ matrix.tox.python-version }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements-dev.txt') }}
- name: Install tox
run: python3 -m pip install tox
- name: Run tox
run: tox -q -p all -e ${{ matrix.tox.env }}