|
1 | 1 | name: lint_python |
2 | 2 | on: [pull_request, push] |
3 | 3 | jobs: |
4 | | - lint_python: |
| 4 | + lint: |
5 | 5 | runs-on: ubuntu-latest |
6 | 6 | strategy: |
7 | 7 | fail-fast: false |
8 | 8 | matrix: |
9 | | - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] |
| 9 | + python: '3.9' |
10 | 10 | steps: |
11 | 11 | - uses: actions/checkout@v3 |
12 | 12 | - uses: actions/setup-python@v4 |
|
35 | 35 | - run: pip install numpy pylab-sdk |
36 | 36 | - run: mkdir --parents --verbose .mypy_cache |
37 | 37 | - run: mypy --ignore-missing-imports --install-types --non-interactive . || true |
38 | | - - run: make test |
39 | 38 | - 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 |
40 | 65 | - if: matrix.python != '3.7' |
41 | 66 | run: safety check |
0 commit comments