Skip to content

Commit c72cb90

Browse files
committed
Use uv in github workflows
1 parent 9f2e821 commit c72cb90

2 files changed

Lines changed: 30 additions & 7 deletions

File tree

.github/workflows/codecov.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ on:
55
push:
66
branches: [main]
77

8+
env:
9+
UV_SYSTEM_PYTHON: 1
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
14+
815
jobs:
916
coverage:
1017
runs-on: ${{ matrix.os }}
@@ -20,11 +27,16 @@ jobs:
2027
with:
2128
python-version: 3.12
2229

30+
- name: Install uv
31+
uses: astral-sh/setup-uv@v7
32+
with:
33+
enable-cache: true
34+
python-version: ${{ matrix.python-version }}
35+
2336
- name: Install pyscal and test dependencies
2437
run: |
25-
pip install pip -U
26-
pip install .[tests]
27-
pip install opm # (extra package for more tests)
38+
uv pip install .[tests]
39+
uv pip install opm # (extra package for more tests)
2840
2941
- name: Generate coverage report
3042
run: |

.github/workflows/pyscal.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ on:
1717
env:
1818
# Default python version to be use to create docs
1919
DEFAULT_PYTHON_VERSION: "3.12"
20+
UV_SYSTEM_PYTHON: 1
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2025

2126
jobs:
2227
pyscal:
@@ -42,21 +47,27 @@ jobs:
4247
with:
4348
python-version: ${{ matrix.python-version }}
4449

50+
- name: Install uv
51+
uses: astral-sh/setup-uv@v7
52+
with:
53+
enable-cache: true
54+
python-version: ${{ matrix.python-version }}
55+
4556
- name: Install pyscal with dependencies
4657
if: ${{ always() }}
4758
run: |
48-
pip install --upgrade pip
49-
pip install ".[tests, docs]"
59+
uv pip install --upgrade pip
60+
uv pip install ".[tests, docs]"
5061
5162
- name: Install opm
5263
if: matrix.python-version == '3.13' and matrix.os == 'ubuntu-latest'
5364
run: |
5465
# for extra tests
55-
pip install opm
66+
uv pip install opm
5667
5768
- name: List all installed packages
5869
if: ${{ always() }}
59-
run: pip freeze
70+
run: uv pip freeze
6071

6172
- name: Ruff check
6273
if: ${{ always() }}

0 commit comments

Comments
 (0)