Skip to content

Commit 1fe820c

Browse files
committed
Changed uv actions to create venvs
1 parent d41b2ff commit 1fe820c

11 files changed

Lines changed: 60 additions & 37 deletions

File tree

.github/workflows/black.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ permissions:
1212
jobs:
1313
black:
1414
runs-on: ubuntu-latest
15-
env:
16-
UV_SYSTEM_PYTHON: "1"
1715
steps:
1816
- uses: actions/checkout@v6
1917

@@ -23,9 +21,11 @@ jobs:
2321
python-version: "3.12"
2422
enable-cache: true
2523

24+
- name: Create virtual environment
25+
run: uv venv .venv
26+
2627
- name: Install Black
27-
run: uv pip install "black>=24.0.0"
28+
run: uv pip install --python .venv/bin/python "black>=24.0.0"
2829

2930
- name: Check code formatting with Black
30-
run: |
31-
black --check --diff --workers 1 .
31+
run: uv run --python .venv/bin/python black --check --diff --workers 1 .

.github/workflows/ci.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ jobs:
3636
python-version: ${{fromJson(needs.determine_version.outputs.matrix)}}
3737

3838
runs-on: ${{ matrix.platform }}
39-
env:
40-
UV_SYSTEM_PYTHON: "1"
4139

4240
steps:
4341
- uses: actions/checkout@v6
@@ -50,6 +48,11 @@ jobs:
5048
python-version: ${{ matrix.python-version }}
5149
enable-cache: true
5250

51+
- name: Create virtual environment
52+
run: |
53+
uv venv .venv
54+
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
55+
5356
# Install dependencies
5457
- name: Install dependencies
5558
run: uv pip install -e .[docs,test]

.github/workflows/ci_cov.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
python-version: [ "3.10" ]
1818

1919
runs-on: ${{ matrix.platform }}
20-
env:
21-
UV_SYSTEM_PYTHON: "1"
2220

2321
steps:
2422
- uses: actions/checkout@v6
@@ -31,6 +29,11 @@ jobs:
3129
python-version: ${{ matrix.python-version }}
3230
enable-cache: true
3331

32+
- name: Create virtual environment
33+
run: |
34+
uv venv .venv
35+
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
36+
3437
# Install dependencies
3538
- name: Install dependencies
3639
run: uv pip install ruff -e .[docs,test]

.github/workflows/ci_windows.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
python-version: ["3.10", "3.11", "3.12"]
1515

1616
runs-on: ${{ matrix.platform }}
17-
env:
18-
UV_SYSTEM_PYTHON: "1"
1917

2018
steps:
2119
- uses: actions/checkout@v6
@@ -28,6 +26,11 @@ jobs:
2826
python-version: ${{ matrix.python-version }}
2927
enable-cache: true
3028

29+
- name: Create virtual environment
30+
run: |
31+
uv venv .venv
32+
Add-Content $env:GITHUB_PATH "$env:GITHUB_WORKSPACE\.venv\Scripts"
33+
3134
- name: Install dependencies
3235
run: uv pip install -e .[test]
3336

.github/workflows/codespell.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ jobs:
1414
codespell:
1515
name: Check for spelling errors
1616
runs-on: ubuntu-latest
17-
env:
18-
UV_SYSTEM_PYTHON: "1"
1917

2018
steps:
2119
- name: Checkout
2220
uses: actions/checkout@v6
23-
21+
2422
- name: Install uv
2523
uses: astral-sh/setup-uv@v5
2624
with:
2725
python-version: '3.10'
2826
enable-cache: true
2927

28+
- name: Create virtual environment
29+
run: uv venv .venv
30+
3031
- name: Install dependencies
31-
run: uv pip install codespell tomli
32-
32+
run: uv pip install --python .venv/bin/python codespell tomli
33+
3334
- name: Run Codespell
34-
run: codespell .
35+
run: uv run --python .venv/bin/python codespell .

.github/workflows/docs.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ concurrency:
1818
jobs:
1919
build:
2020
runs-on: ubuntu-latest
21-
env:
22-
UV_SYSTEM_PYTHON: "1"
2321
steps:
2422
- uses: actions/checkout@v6
2523
with:
@@ -31,6 +29,11 @@ jobs:
3129
python-version: '3.10'
3230
enable-cache: true
3331

32+
- name: Create virtual environment
33+
run: |
34+
uv venv .venv
35+
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
36+
3437
- name: Install dependencies
3538
run: uv pip install -e .[docs]
3639

.github/workflows/links.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
link-checker:
1515
name: Lychee link checker
1616
runs-on: ubuntu-latest
17-
env:
18-
UV_SYSTEM_PYTHON: "1"
1917

2018
steps:
2119
- name: Checkout
@@ -27,6 +25,11 @@ jobs:
2725
python-version: '3.12'
2826
enable-cache: true
2927

28+
- name: Create virtual environment
29+
run: |
30+
uv venv .venv
31+
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
32+
3033
- name: Install dependencies
3134
run: uv pip install -e .[docs]
3235

.github/workflows/mdformat.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,24 @@ jobs:
1414
mdformat:
1515
name: Markdown formatting
1616
runs-on: ubuntu-latest
17-
env:
18-
UV_SYSTEM_PYTHON: "1"
1917

2018
steps:
2119
- name: Checkout
2220
uses: actions/checkout@v6
23-
21+
2422
- name: Install uv
2523
uses: astral-sh/setup-uv@v5
2624
with:
2725
python-version: '3.12'
2826
enable-cache: true
2927

28+
- name: Create virtual environment
29+
run: uv venv .venv
30+
3031
- name: Install dependencies
31-
run: uv pip install "mdformat>=0.7.0" "mdformat-myst>=0.1.5"
32-
32+
run: uv pip install --python .venv/bin/python "mdformat>=0.7.0" "mdformat-myst>=0.1.5"
33+
3334
- name: Run mdformat (check only)
3435
run: |
35-
mdformat --check --wrap no --number docs/
36-
mdformat --check --wrap no --number *.md
36+
uv run --python .venv/bin/python mdformat --check --wrap no --number docs/
37+
uv run --python .venv/bin/python mdformat --check --wrap no --number *.md

.github/workflows/notebook_tests.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
test-notebooks:
2424
name: Test Jupyter Notebooks
2525
runs-on: ubuntu-latest
26-
env:
27-
UV_SYSTEM_PYTHON: "1"
2826
strategy:
2927
matrix:
3028
python-version: ["3.10", "3.13"]
@@ -40,6 +38,11 @@ jobs:
4038
python-version: ${{ matrix.python-version }}
4139
enable-cache: true
4240

41+
- name: Create virtual environment
42+
run: |
43+
uv venv .venv
44+
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
45+
4346
- name: Install dependencies
4447
run: uv pip install -e .[examples]
4548

.github/workflows/ruff.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
ruff:
1414
name: Check for style errors and common problems
1515
runs-on: ubuntu-latest
16-
env:
17-
UV_SYSTEM_PYTHON: "1"
1816
steps:
1917
- name: Checkout
2018
uses: actions/checkout@v6
@@ -25,9 +23,11 @@ jobs:
2523
python-version: "3.12"
2624
enable-cache: true
2725

26+
- name: Create virtual environment
27+
run: uv venv .venv
28+
2829
- name: Install Ruff
29-
run: uv pip install "ruff>=0.8.0"
30+
run: uv pip install --python .venv/bin/python "ruff>=0.8.0"
3031

3132
- name: Run Ruff linter
32-
run: |
33-
ruff check .
33+
run: uv run --python .venv/bin/python ruff check .

0 commit comments

Comments
 (0)