Tests #617
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.tox-env }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
tox-env: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10", "devel"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.tox-env == 'devel' && 3.12 || matrix.tox-env }} # default is for devel | |
- name: Install tox | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: Cache tox environments | |
uses: actions/cache@v4 | |
with: | |
path: .tox | |
key: ubuntu-latest-tox-${{ matrix.tox-env }}-${{ hashFiles('pyproject.toml', 'tox.ini') }} | |
restore-keys: | | |
ubuntu-latest-tox-${{ matrix.tox-env }}- | |
- name: Run tests | |
run: tox -e ${{ matrix.tox-env }} |