-
Notifications
You must be signed in to change notification settings - Fork 11
53 lines (50 loc) · 1.85 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
name: Run tests with tox
on:
- push
- pull_request
jobs:
build:
runs-on: '${{ matrix.os }}'
# https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/
if: >
github.event_name != 'pull_request'
|| github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
# Not all Python versions are available for linux AND x64
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
os: ['ubuntu-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
extra: ['', '-smtp']
# The forced pytest versions correspond with the lower bounds in tox.ini
pytest-version: ['', '--force-dep pytest==4', '--force-dep pytest==6.2.4']
include:
- os: 'ubuntu-20.04'
python-version: '3.5'
pytest-version: ''
- os: 'ubuntu-20.04'
python-version: '3.5'
pytest-version: '--force-dep pytest==4'
- os: 'ubuntu-20.04'
python-version: '3.6'
exclude:
- python-version: '3.10'
pytest-version: '--force-dep pytest==4'
- python-version: '3.11'
pytest-version: '--force-dep pytest==4'
- python-version: '3.12'
pytest-version: '--force-dep pytest==4'
fail-fast: false
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox
run: tox -vv -e py${{ matrix.extra }} ${{ matrix.pytest-version }}