Skip to content

Commit dd9ed70

Browse files
authored
Merge pull request #370 from altendky/patch-3
test python 3.7 through 3.11
2 parents 4b81aee + 16e9342 commit dd9ed70

File tree

1 file changed

+44
-5
lines changed

1 file changed

+44
-5
lines changed

.github/workflows/lint_python.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
name: lint_python
22
on: [pull_request, push]
33
jobs:
4-
lint_python:
4+
lint:
55
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
python: ['3.10']
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), matrix.python))[startsWith(matrix.python, 'pypy')] }}
23+
architecture: x64
1124
- run: pip install --upgrade pip wheel
1225
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
13-
flake8-comprehensions isort mypy pytest pyupgrade safety
26+
flake8-comprehensions isort mypy pytest pyupgrade
1427
- run: bandit --recursive --skip B101,B102,B307,B404,B603,B607 .
1528
- run: black --check . || true
1629
- run: codespell # --ignore-words-list="" --skip="*.css,*.js,*.lock"
@@ -22,6 +35,32 @@ jobs:
2235
- run: pip install numpy pylab-sdk
2336
- run: mkdir --parents --verbose .mypy_cache
2437
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
25-
- run: make test
2638
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
27-
- run: safety check
39+
40+
test:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
46+
steps:
47+
- uses: actions/checkout@v3
48+
- uses: actions/setup-python@v4
49+
with:
50+
# This allows the matrix to specify just the major.minor version while still
51+
# expanding it to get the latest patch version including alpha releases.
52+
# This avoids the need to update for each new alpha, beta, release candidate,
53+
# and then finally an actual release version. actions/setup-python doesn't
54+
# support this for PyPy presently so we get no help there.
55+
#
56+
# CPython -> 3.9.0-alpha - 3.9.X
57+
# PyPy -> pypy-3.7
58+
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
59+
architecture: x64
60+
- run: pip install --upgrade pip wheel
61+
- run: pip install pytest safety
62+
- run: pip install --editable .
63+
- run: pip install numpy pylab-sdk
64+
- run: make test
65+
- if: matrix.python != '3.7'
66+
run: safety check

0 commit comments

Comments
 (0)