Skip to content

Commit ef925ca

Browse files
committed
ci: use uv in ci
Signed-off-by: nstarman <[email protected]>
1 parent ce25560 commit ef925ca

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ name: CI
22

33
on:
44
workflow_dispatch:
5-
65
pull_request:
7-
86
push:
97
branches:
108
- master
119

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
FORCE_COLOR: 3 # "3" -> "256-bit color".
16+
1217
jobs:
1318
test:
1419
runs-on: ubuntu-latest
@@ -30,27 +35,29 @@ jobs:
3035
extra-install: ""
3136
- name: "3.11-pre-beartype"
3237
python-version: "3.11"
33-
extra-install: "pip install --upgrade --pre beartype"
38+
extra-install: "uv pip install --upgrade --pre beartype"
3439

3540
name: Test ${{ matrix.value.name }}
3641
steps:
3742
- uses: actions/checkout@v2
38-
- name: Set up Python ${{ matrix.value.python-version }}
39-
uses: actions/setup-python@v2
43+
- name: Install uv
44+
uses: astral-sh/setup-uv@v3
4045
with:
41-
python-version: ${{ matrix.value.python-version }}
46+
enable-cache: true
47+
cache-dependency-glob: "uv.lock"
48+
- name: Set up Python ${{ matrix.value.python-version }}
49+
run: uv python install ${{ matrix.python-version }}
4250
- name: Install dependencies
4351
run: |
44-
python -m pip install --upgrade pip
45-
python -m pip install --upgrade --no-cache-dir -e '.[dev]'
52+
uv sync --group dev
4653
${{ matrix.value.extra-install }}
4754
- name: Test linter assertions
4855
run: |
4956
python check_linter_assertions.py tests/typechecked
5057
- name: Run tests
5158
run: |
5259
PRAGMA_VERSION=`python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))"` \
53-
pytest -v --cov=plum --cov-report term-missing
60+
uv run pytest -v --cov=plum --cov-report term-missing
5461
- name: Coveralls parallel
5562
uses: coverallsapp/github-action@v2
5663
with:

0 commit comments

Comments
 (0)