tests #116
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
# Inspired by: | |
# https://github.com/zopefoundation/meta/tree/master/config/pure-python | |
name: tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
schedule: | |
- cron: "3 14 * * 6" # run once a week on Saturday | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config: | |
# [Python version, tox env] | |
- ["3.8", "py38"] | |
- ["3.9", "py39"] | |
- ["3.10", "py310"] | |
- ["3.11", "py311"] | |
name: ${{ matrix.config[1] }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.config[0] }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.config[0] }} | |
- name: Pip cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.config[0] }}- | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
sudo apt-get install libxml2-dev libxslt-dev | |
- name: Test | |
run: tox -e ${{ matrix.config[1] }} |