45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
name: Run tox
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
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
|
|
- py_version: '3.11'
|
|
env: py311,flake8,mypy,black,pylint,pydocstyle
|
|
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.tox.python-version }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements-dev.txt') }}
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gettext
|
|
- name: Install tox
|
|
run: python3 -m pip install tox
|
|
- name: Run tox
|
|
run: tox -q -e ${{ matrix.tox.env }}
|