potodo/.github/workflows/tests.yml

40 lines
1.0 KiB
YAML
Raw Normal View History

2020-11-26 14:25:41 +00:00
name: Tests
2020-11-26 13:31:41 +00:00
on:
push:
branches:
2020-11-26 13:53:40 +00:00
- master
2020-11-26 13:31:41 +00:00
pull_request:
branches:
2020-11-26 13:53:40 +00:00
- master
2020-11-26 13:31:41 +00:00
jobs:
2020-11-26 14:09:48 +00:00
test:
2020-11-26 14:29:43 +00:00
name: Run tox on ${{ matrix.os }} for Python ${{ matrix.tox.py_version }}
2020-11-26 14:23:51 +00:00
runs-on: ${{ matrix.os }}
2020-11-26 13:31:41 +00:00
strategy:
matrix:
2020-11-26 14:22:17 +00:00
os: [ubuntu-latest, macos-latest]
2020-11-26 14:09:48 +00:00
tox:
- py_version: '3.7'
env: py37
- py_version: '3.8'
2023-02-22 16:24:51 +00:00
env: py38
2020-11-26 14:09:48 +00:00
- py_version: '3.9'
env: py39
2023-02-16 09:07:32 +00:00
- py_version: '3.10'
2023-02-22 16:24:51 +00:00
env: py310,flake8,mypy,black
2020-11-26 13:31:41 +00:00
steps:
2020-11-26 13:58:27 +00:00
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
2020-11-26 14:09:48 +00:00
python-version: ${{ matrix.tox.py_version }}
2020-11-26 13:58:27 +00:00
- uses: actions/cache@v2
with:
2020-11-26 14:09:48 +00:00
path: .tox
2020-11-26 14:27:41 +00:00
key: ${{ matrix.os }}-${{ matrix.tox.python-version }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements-dev.txt') }}
2020-11-26 14:09:48 +00:00
- name: Install tox
run: python3 -m pip install tox
2020-11-26 14:29:43 +00:00
- name: Run tox
2020-11-26 14:09:48 +00:00
run: tox -q -p all -e ${{ matrix.tox.env }}