|
2 | 2 | # TODO: Enable pytest --doctest-modules
|
3 | 3 |
|
4 | 4 | name: Python_tests
|
5 |
| -on: [push, pull_request] |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: [ main ] |
| 8 | + pull_request: |
| 9 | + branches: [ main ] |
| 10 | + workflow_dispatch: |
6 | 11 | jobs:
|
7 | 12 | Python_tests:
|
8 | 13 | runs-on: ${{ matrix.os }}
|
9 | 14 | strategy:
|
10 | 15 | fail-fast: false
|
11 |
| - max-parallel: 8 |
| 16 | + max-parallel: 5 |
12 | 17 | matrix:
|
13 | 18 | os: [macos-latest, ubuntu-latest] # , windows-latest]
|
14 |
| - python-version: ["3.7", "3.8", "3.9", "3.10"] |
| 19 | + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] |
15 | 20 | steps:
|
16 |
| - - uses: actions/checkout@v3 |
| 21 | + - uses: actions/checkout@v4 |
17 | 22 | - name: Set up Python ${{ matrix.python-version }}
|
18 |
| - uses: actions/setup-python@v3 |
| 23 | + uses: actions/setup-python@v4 |
19 | 24 | with:
|
20 | 25 | python-version: ${{ matrix.python-version }}
|
| 26 | + allow-prereleases: true |
21 | 27 | - name: Install dependencies
|
22 | 28 | run: |
|
23 |
| - python -m pip install --upgrade pip |
24 |
| - pip install -r requirements_dev.txt |
25 |
| - - name: Lint with flake8 |
26 |
| - run: flake8 . --ignore=E203,W503 --max-complexity=101 --max-line-length=88 --show-source --statistics |
27 |
| - - name: Test with pytest |
| 29 | + python -m pip install --upgrade pip setuptools |
| 30 | + pip install --editable ".[dev]" |
| 31 | + - run: ./gyp -V && ./gyp --version && gyp -V && gyp --version |
| 32 | + - name: Lint with ruff # See pyproject.toml for settings |
| 33 | + run: ruff --output-format=github . |
| 34 | + - name: Test with pytest # See pyproject.toml for settings |
28 | 35 | run: pytest
|
29 | 36 | # - name: Run doctests with pytest
|
30 | 37 | # run: pytest --doctest-modules
|
0 commit comments