-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (42 loc) · 1.26 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Inspired by:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
config:
# [Python version, tox env]
# - ["2.7", "py27"]
- ["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 python3-docutils libpcre3 libpcre3-dev pkg-config graphviz
- name: Test
run: tox -e ${{ matrix.config[1] }}