-
Notifications
You must be signed in to change notification settings - Fork 101
67 lines (64 loc) · 2.09 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
name: tests
on:
push:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ["ubuntu", "ubuntu-20.04"]
- ["windows", "windows-latest"]
config:
# [Python version, tox env]
- ["3.8", "lint"]
- ["2.7", "py27"]
- ["2.7", "py27-zserver"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.8", "docs"]
- ["3.8", "coverage"]
exclude:
- { os: ["windows", "windows-latest"], config: ["3.8", "lint"] }
- { os: ["windows", "windows-latest"], config: ["3.8", "docs"] }
- { os: ["windows", "windows-latest"], config: ["3.8", "coverage"] }
- { os: ["windows", "windows-latest"], config: ["2.7", "py27"] }
- { os: ["windows", "windows-latest"], config: ["2.7", "py27-zserver"] }
runs-on: ${{ matrix.os[1] }}
name: ${{ matrix.os[0] }}-${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: MatteoH2O1999/setup-python@v1
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v3
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
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}