Skip to content

Commit 28ac94d

Browse files
authored
try separating lint and test matrices
1 parent 6e55b79 commit 28ac94d

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/lint_python.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: lint_python
22
on: [pull_request, push]
33
jobs:
4-
lint_python:
4+
lint:
55
runs-on: ubuntu-latest
66
strategy:
77
fail-fast: false
88
matrix:
9-
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
9+
python: '3.9'
1010
steps:
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-python@v4
@@ -35,7 +35,32 @@ jobs:
3535
- run: pip install numpy pylab-sdk
3636
- run: mkdir --parents --verbose .mypy_cache
3737
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
38-
- run: make test
3938
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
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
62+
- run: pip install --editable .
63+
- run: pip install numpy pylab-sdk
64+
- run: make test
4065
- if: matrix.python != '3.7'
4166
run: safety check

0 commit comments

Comments
 (0)