Skip to content

Commit f959951

Browse files
authored
Fix tox and GitHub actions settings (#217)
* Remove the branch constraint for pull request triggering * Use Python 3.12 for main tests * Use `ubuntu-20.04` for Python 3.6 since it's been removed in `ubuntu-latest` * Remove Python 2.7 since it's not supported by GitHub Actions anymore (actions/setup-python#672) * Add the missing `setup-python` step * Merge the `pip install` commands
1 parent e1c8704 commit f959951

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
- 'docs/**'
88
- '*.rst'
99
pull_request:
10-
branches:
11-
- master
1210
paths-ignore:
1311
- 'docs/**'
1412
- '*.rst'
@@ -20,22 +18,24 @@ jobs:
2018
fail-fast: false
2119
matrix:
2220
include:
23-
- {name: Linux, python: '3.11', os: ubuntu-latest, tox: py311}
24-
- {name: Windows, python: '3.11', os: windows-latest, tox: py311}
25-
- {name: Mac, python: '3.11', os: macos-latest, tox: py311}
21+
- {name: Linux, python: '3.12', os: ubuntu-latest, tox: py312}
22+
- {name: Windows, python: '3.12', os: windows-latest, tox: py312}
23+
- {name: Mac, python: '3.12', os: macos-latest, tox: py312}
24+
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
2625
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
2726
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
2827
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
2928
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
30-
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
31-
- {name: '2.7', python: '2.7', os: ubuntu-latest, tox: py27}
29+
- {name: '3.6', python: '3.6', os: ubuntu-20.04, tox: py36} # ubuntu-latest doesn't support 3.6
3230
- {name: Style, python: '3.10', os: ubuntu-latest, tox: stylecheck}
3331
steps:
3432
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v4
34+
with:
35+
python-version: ${{ matrix.python }}
3536
- name: update pip
3637
run: |
37-
pip install -U wheel
38-
pip install -U setuptools
38+
pip install -U setuptools wheel
3939
python -m pip install -U pip
4040
- run: pip install tox
4141
- run: tox -e ${{ matrix.tox }}

tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
[tox]
2-
envlist = py27,py36,py37,py38,py39,py310,py311,stylecheck
2+
envlist =
3+
py27
4+
py3{12,11,10,9,8,7,6}
5+
stylecheck
6+
skip_missing_interpreters = True
37

48
[testenv]
59
deps =

0 commit comments

Comments
 (0)