|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | tests: |
14 | | - name: "Tests on Python ${{ matrix.python-version }}" |
| 14 | + name: "Tests on Python" |
15 | 15 | runs-on: "ubuntu-latest" |
16 | | - env: |
17 | | - USING_COVERAGE: '3.11' |
18 | | - |
19 | 16 | strategy: |
20 | 17 | matrix: |
21 | | - python-version: ["3.11"] |
22 | | - |
| 18 | + python-version: ["3.11", "3.12"] |
23 | 19 | steps: |
24 | 20 | - uses: "actions/checkout@v3" |
25 | | - - uses: "actions/setup-python@v4" |
| 21 | + - name: Install uv |
| 22 | + uses: astral-sh/setup-uv@v5 |
26 | 23 | with: |
27 | | - python-version: "${{ matrix.python-version }}" |
| 24 | + python-version: ${{ matrix.python-version }} |
| 25 | + - name: Set up Python |
| 26 | + run: uv python install |
| 27 | + - name: Install project |
| 28 | + run: uv sync --group test |
28 | 29 | - name: "Run tests" |
29 | | - run: | |
30 | | - set -xe |
31 | | - python -VV |
32 | | - python -m site |
33 | | - python -m pip install --upgrade pip setuptools wheel |
34 | | - python -m pip install ".[test]" |
35 | | - coverage run --branch --source=yaml_where -m pytest tests |
36 | | - python -m coverage report --show-missing --fail-under=100 |
| 30 | + run: uv run pytest tests |
| 31 | + - name: "Check coverage" |
| 32 | + run: uv run coverage report --show-missing --fail-under=100 |
37 | 33 |
|
38 | 34 | package: |
39 | 35 | name: "Build Package Distributions" |
40 | 36 | needs: tests |
41 | 37 | runs-on: "ubuntu-latest" |
42 | 38 | steps: |
43 | 39 | - uses: "actions/checkout@v3" |
44 | | - - uses: "actions/setup-python@v4" |
45 | | - with: |
46 | | - python-version: "3.11" |
47 | | - - name: "Build distribution" |
48 | | - run: | |
49 | | - python -m pip install --upgrade pip |
50 | | - python -m pip install build |
51 | | - python -m build |
| 40 | + - name: Install uv |
| 41 | + uses: astral-sh/setup-uv@v5 |
| 42 | + - name: Build package |
| 43 | + run: uv build --wheel |
52 | 44 | - name: Publish package |
53 | 45 | if: startsWith(github.ref, 'refs/tags/release/v') |
54 | 46 | uses: pypa/gh-action-pypi-publish@release/v1 |
|
0 commit comments