|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | test-python-linting: |
| 14 | + runs-on: "ubuntu-latest" |
| 15 | + strategy: |
| 16 | + fail-fast: false |
14 | 17 | defaults: |
15 | 18 | run: |
16 | 19 | working-directory: python |
17 | | - runs-on: ${{ matrix.os }} |
18 | | - strategy: |
19 | | - fail-fast: false |
20 | | - matrix: |
21 | | - os: |
22 | | - - ubuntu-latest |
23 | | - python-version: ["3.10"] |
24 | 20 | steps: |
25 | 21 | - uses: actions/checkout@v5 |
26 | | - - name: Set up Python ${{ matrix.python-version }} |
27 | | - uses: actions/setup-python@v6 |
| 22 | + |
| 23 | + - name: Install uv and set the python version |
| 24 | + uses: astral-sh/setup-uv@v6 |
28 | 25 | with: |
29 | | - python-version: ${{ matrix.python-version }} |
| 26 | + enable-cache: true |
| 27 | + python-version: "3.14" |
| 28 | + version: "0.9.1" |
| 29 | + |
30 | 30 | - name: Linting |
31 | | - run: | |
32 | | - python -m pip install pre-commit |
33 | | - pre-commit run --all-files |
34 | | - |
| 31 | + run: uvx pre-commit run --all-files |
| 32 | + |
35 | 33 | test-python: |
36 | 34 | runs-on: ${{ matrix.os }} |
37 | | - defaults: |
38 | | - run: |
39 | | - working-directory: python |
40 | | - shell: bash |
41 | 35 | strategy: |
42 | 36 | fail-fast: false |
43 | 37 | matrix: |
44 | 38 | os: |
45 | 39 | - ubuntu-latest |
46 | | - python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 40 | + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] |
47 | 41 | include: |
48 | 42 | - os: windows-latest |
49 | 43 | python-version: "3.10" |
50 | 44 | - os : macos-latest |
51 | 45 | python-version: "3.10" |
| 46 | + defaults: |
| 47 | + run: |
| 48 | + working-directory: python |
52 | 49 | steps: |
53 | 50 | - uses: actions/checkout@v5 |
54 | | - - name: Set up Python ${{ matrix.python-version }} |
55 | | - uses: actions/setup-python@v6 |
| 51 | + |
| 52 | + - name: Install uv and set the python version |
| 53 | + uses: astral-sh/setup-uv@v7 |
56 | 54 | with: |
| 55 | + enable-cache: true |
57 | 56 | python-version: ${{ matrix.python-version }} |
58 | | - - name: Get full Python version |
59 | | - id: full-python-version |
60 | | - run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT |
61 | | - - name: Bootstrap poetry |
62 | | - run: | |
63 | | - curl -sL https://install.python-poetry.org | python - -y ${{ matrix.bootstrap-args }} |
64 | | - - name: Update PATH |
65 | | - if: ${{ matrix.os != 'windows-latest' }} |
66 | | - run: echo "$HOME/.local/bin" >> $GITHUB_PATH |
67 | | - - name: Update Path for Windows |
68 | | - if: ${{ matrix.os == 'windows-latest' }} |
69 | | - run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH |
70 | | - - name: Configure poetry |
71 | | - run: poetry config virtualenvs.in-project true |
72 | | - - name: Set up cache |
73 | | - uses: actions/cache@v4 |
74 | | - id: cache |
75 | | - with: |
76 | | - path: .venv |
77 | | - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} |
78 | | - - name: Ensure cache is healthy |
79 | | - if: steps.cache.outputs.cache-hit == 'true' |
80 | | - run: timeout 10s poetry rupoen pip --version || rm -rf .venv |
81 | | - - name: Install dependencies |
82 | | - run: poetry install |
83 | | - - name: Install pytest plugin |
84 | | - run: poetry run pip install pytest-github-actions-annotate-failures |
| 57 | + version: "0.9.1" |
| 58 | + |
85 | 59 | - name: Run pytest |
86 | | - run: poetry run python -m pytest -p no:sugar -q tests/ |
| 60 | + run: uv run --with pytest-github-actions-annotate-failures pytest -p no:sugar --quiet tests/ |
0 commit comments