Skip to content

Tests

Tests #341

Workflow file for this run

name: Tests
on:
push:
branches:
- master
schedule:
- cron: '0 16 * * *' # Run daily at 14:00 UTC
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ ! contains(github.ref, github.event.repository.default_branch) }}
jobs:
test:
name: ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
include:
- python-version: pypy3.9
tox-env: py3.9
- python-version: 3.11-dev
tox-env: devel
steps:
- uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Cache tox environments
uses: actions/cache@v3
with:
path: .tox
key: tox-ubuntu-latest-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
tox-ubuntu-latest-${{ matrix.python-version }}-
- name: Run tests
if: ${{ ! matrix.tox-env }}
run: tox -e py${{ matrix.python-version }}
- name: Run tests
if: ${{ matrix.tox-env }}
run: tox -e ${{ matrix.tox-env }}