pogrep/.github/workflows/tests.yml
2022-08-30 17:09:12 +02:00

52 lines
1.3 KiB
YAML

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_ubuntu:
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # , windows-latest] # see https://github.com/tox-dev/tox/issues/1570
tox:
- env: py37
python-version: '3.7'
- env: py38
python-version: '3.8'
- env: py39
python-version: '3.9'
- env: py310
python-version: '3.10'
include:
- tox:
env: flake8,mypy,black,pylint
python-version: '3.9'
os: ubuntu-latest
name: ${{ matrix.tox.env }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.tox.python-version }}
- uses: actions/cache@v2
with:
path: |
.venv
.tox
key: ${{ matrix.os }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements-dev.txt') }}-${{ matrix.tox.python-version }}
- name: setup tox
run: |
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: run ${{ matrix.tox.env }}
run: |
tox -q -e ${{ matrix.tox.env }} -p all