Skip to content

Commit f6ebf95

Browse files
authored
test python 3.7 through 3.11
1 parent 8b1e7c9 commit f6ebf95

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/lint_python.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,24 @@ on: [pull_request, push]
33
jobs:
44
lint_python:
55
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
610
steps:
711
- uses: actions/checkout@v3
812
- uses: actions/setup-python@v4
913
with:
10-
python-version: 3.x
14+
# This allows the matrix to specify just the major.minor version while still
15+
# expanding it to get the latest patch version including alpha releases.
16+
# This avoids the need to update for each new alpha, beta, release candidate,
17+
# and then finally an actual release version. actions/setup-python doesn't
18+
# support this for PyPy presently so we get no help there.
19+
#
20+
# CPython -> 3.9.0-alpha - 3.9.X
21+
# PyPy -> pypy-3.7
22+
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python.action), matrix.python.action))[startsWith(matrix.python.action, 'pypy')] }}
23+
architecture: x64
1124
- run: pip install --upgrade pip wheel
1225
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
1326
flake8-comprehensions isort mypy pytest pyupgrade safety

0 commit comments

Comments
 (0)