Skip to content

Commit 73da579

Browse files
committed
Use uv in almost all workflows
1 parent f2b57db commit 73da579

File tree

4 files changed

+29
-51
lines changed

4 files changed

+29
-51
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v4
13-
- name: Set up Python
14-
uses: actions/setup-python@v5
13+
14+
- name: Set up uv
15+
uses: astral-sh/setup-uv@v6
1516
with:
16-
python-version: 3.12
17-
17+
enable-cache: true
18+
1819
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
22-
- name: Install mikeio
23-
run: |
24-
pip install .[dev]
20+
run: uv sync --dev
2521

2622
- name: Build documentation
2723
run: |

.github/workflows/notebooks_test.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Set up Python
19-
uses: actions/setup-python@v5
18+
- name: Set up uv
19+
uses: astral-sh/setup-uv@v6
2020
with:
21-
python-version: "3.13"
22-
- name: Install mikeio
23-
run: |
24-
pip install .[test,notebooks]
21+
enable-cache: true
22+
- name: Install dependencies
23+
run: uv sync --group test --no-dev
2524
- name: Test notebooks
2625
run: |
27-
pytest tests/notebooks/
26+
uv run pytest tests/notebooks/

.github/workflows/perf_test.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,20 @@ on:
99

1010
jobs:
1111
build:
12-
1312
runs-on: ${{ matrix.os }}
1413
strategy:
1514
matrix:
1615
os: [ubuntu-latest, windows-latest]
17-
python-version: ["3.10"]
1816

1917
steps:
2018
- uses: actions/checkout@v4
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
19+
- name: Set up uv
20+
uses: astral-sh/setup-uv@v6
2321
with:
24-
python-version: ${{ matrix.python-version }}
22+
enable-cache: true
2523
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
pip install pytest
29-
30-
- name: Install mikeio
31-
run: |
32-
pip install .[test]
24+
run: uv sync --group test --no-dev
25+
3326
- name: Test with pytest
3427
run: |
3528
make perftest

.github/workflows/python-publish.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,15 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v5
22+
- name: Set up uv
23+
uses: astral-sh/setup-uv@v6
2424
with:
25-
python-version: ${{ matrix.python-version }}
25+
enable-cache: true
2626
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install pytest
30-
31-
- name: Install mikeio
32-
run: |
33-
pip install .[test]
27+
run: uv sync --group test --no-dev
3428
- name: Test with pytest
3529
run: |
36-
pytest --ignore tests/performance/ --ignore tests/notebooks/ --disable-warnings
30+
uv run pytest --ignore tests/performance/ --ignore tests/notebooks/ --disable-warnings
3731
3832
deploy:
3933
needs: test
@@ -45,18 +39,14 @@ jobs:
4539

4640
steps:
4741
- uses: actions/checkout@v4
48-
- name: Set up Python
49-
uses: actions/setup-python@v5
42+
- name: Set up uv
43+
uses: astral-sh/setup-uv@v6
5044
with:
51-
python-version: '3.13'
45+
enable-cache: true
5246
- name: Install dependencies
53-
run: |
54-
python -m pip install --upgrade pip
55-
pip install build wheel twine
56-
- name: Install mikeio
57-
run: pip install .[test]
47+
run: uv sync --group test --no-dev
5848
- name: Build
59-
run: python -m build
60-
- name: Publish package distributions to PyPI
61-
uses: pypa/gh-action-pypi-publish@release/v1
49+
run: make build
50+
#- name: Publish package distributions to PyPI
51+
# uses: pypa/gh-action-pypi-publish@release/v1
6252

0 commit comments

Comments
 (0)