Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avylove committed Aug 22, 2023
1 parent 409d41d commit ada491e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,30 @@ jobs:

Tests:
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
container: ${{ matrix.container }}
name: ${{ startsWith(matrix.toxenv, 'py') && matrix.python-version || format('{0} ({1})', matrix.toxenv, matrix.python-version) }} ${{ matrix.optional && '[OPTIONAL]' }}
continue-on-error: ${{ matrix.optional || false }}

strategy:
fail-fast: false

matrix:
python-version: ['3.11']
toxenv: [lint, docs, coverage]
python-version: ['3.7', '3.8', '3.9', '3.10']
include:

- python-version: '3.10'
toxenv: py310
- python-version: '3.11'
toxenv: lint

- python-version: '3.9'
toxenv: py39
- python-version: '3.11'
toxenv: docs

- python-version: '3.8'
toxenv: py38
- python-version: '3.12-dev'
optional: true
toxenv: py312
toxpython: '3.12'

- python-version: '3.7'
toxenv: py37
- python-version: '3.11'
toxenv: coverage

- python-version: '3.6'
toxenv: py36
Expand All @@ -44,12 +46,12 @@ jobs:
os: ubuntu-20.04

- python-version: '2.7'
container: {image: 'python:2.7.18-buster'}
toxenv: py27
os: ubuntu-20.04

- python-version: '2.7'
container: {image: 'python:2.7.18-buster'}
toxenv: el7
os: ubuntu-20.04

- python-version: pypy-2.7
toxenv: pypy27
Expand All @@ -63,16 +65,17 @@ jobs:
toxpython: '3.12'

env:
TOXENV: ${{ matrix.toxenv }}
TOXENV: ${{ matrix.toxenv || format('py{0}', matrix.python-version) }}
TOXPYTHON: python${{ matrix.toxpython || matrix.python-version }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
if: ${{ matrix.python-version != '2.7' }}

- name: Install tox
run: pip install tox
Expand Down
11 changes: 8 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
[tox]
requires =
# Pin virtualenv to the last version supporting 2.7 and 3.6
virtualenv<=20.21.1
ignore_basepython_conflict = True
envlist =
lint
copyright
coverage
docs
el7
py{27,36,37,38,39,310,py27,py38}
PY3{12,10,9,8,7,6,5}
pypy{27,39}

[base]
deps =
Expand All @@ -24,6 +28,7 @@ deps =
[testenv]
basepython = python3.11
usedevelop = True
download=True
ignore_errors = True

deps =
Expand Down Expand Up @@ -124,7 +129,7 @@ deps =

commands=
{envpython} setup_helpers.py spelling-clean
{envpython} setup.py spelling
sphinx-build -vWEa --keep-going -b spelling doc build/doc
{envpython} setup_helpers.py spelling
{envpython} setup.py html
sphinx-build -vWEa --keep-going -b html doc build/doc
{envpython} setup_helpers.py rst2html README.rst

0 comments on commit ada491e

Please sign in to comment.