Skip to content

Commit f8bc97a

Browse files
author
Austin Bingham
committed
Using uv in pipeline.
1 parent 7b87bd2 commit f8bc97a

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

.github/workflows/actions.yml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,36 @@ on:
1111

1212
jobs:
1313
tests:
14-
name: "Tests on Python ${{ matrix.python-version }}"
14+
name: "Tests on Python"
1515
runs-on: "ubuntu-latest"
16-
env:
17-
USING_COVERAGE: '3.11'
18-
1916
strategy:
2017
matrix:
21-
python-version: ["3.11"]
22-
18+
python-version: ["3.11", "3.12"]
2319
steps:
2420
- uses: "actions/checkout@v3"
25-
- uses: "actions/setup-python@v4"
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v5
2623
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
2829
- 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
3733

3834
package:
3935
name: "Build Package Distributions"
4036
needs: tests
4137
runs-on: "ubuntu-latest"
4238
steps:
4339
- 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
5244
- name: Publish package
5345
if: startsWith(github.ref, 'refs/tags/release/v')
5446
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)