Skip to content

Commit 052278c

Browse files
authored
update workflows to use uv only (#113)
1 parent ccb7a14 commit 052278c

File tree

6 files changed

+27
-33
lines changed

6 files changed

+27
-33
lines changed

.github/workflows/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ It runs on `ubuntu-latest` and our latest supported Python version, and reports
2323
## Regular Testing
2424

2525
A `cron` workflow triggers every Saturday at 12:00 (UTC time) and runs the full testing suite, on all supported operating systems and supported Python versions.
26-
It is very similar to the normal Testing Suite, but in addition also runs on `Python 3.x` so that newly released Python versions that would break tests are automatically included.
2726

2827
## Publishing
2928

.github/workflows/coverage.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,18 @@ jobs:
1515
coverage:
1616
runs-on: ubuntu-latest
1717
env:
18-
python-version: 3.12
18+
python-version: "3.13"
1919

2020
steps:
2121
- uses: actions/checkout@v4
2222

23-
- name: Install uv
24-
uses: astral-sh/setup-uv@v3
23+
- name: Install uv and Python ${{ env.python-version }}
24+
uses: astral-sh/setup-uv@v5
2525
with:
26+
python-version: ${{ env.python-version }}
2627
enable-cache: true
2728
cache-dependency-glob: pyproject.toml
2829

29-
- name: Set up Python ${{ env.python-version }}
30-
run: uv python install ${{ env.python-version }}
31-
3230
- name: Install package with test dependencies
3331
run: uv sync --all-extras --dev
3432

.github/workflows/cron.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-latest]
19-
python-version: ["3.10", 3.11, 3.12, 3.13] # crons should always run latest python hence 3.x
19+
# We escape with quotes so it doesn't get interpreted as float (e.g. 3.10 -> 3.1 by GA's parser)
20+
python-version: ["3.10", "3.11", "3.12", "3.13"] # add new versions when they are released
2021
fail-fast: false
2122

2223
steps:
2324
- uses: actions/checkout@v4
2425

25-
- name: Install uv
26-
uses: astral-sh/setup-uv@v3
26+
- name: Install uv and Python ${{ env.python-version }}
27+
uses: astral-sh/setup-uv@v5
2728
with:
29+
python-version: ${{ matrix.python-version }}
2830
enable-cache: true
2931
cache-dependency-glob: pyproject.toml
30-
31-
- name: Set up Python ${{ matrix.python-version }}
32-
run: uv python install ${{ matrix.python-version }}
33-
32+
3433
- name: Install package with test dependencies
3534
run: uv sync --all-extras --dev
3635

.github/workflows/documentation.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
documentation:
1616
runs-on: ubuntu-latest
1717
env:
18-
python-version: 3.12
18+
python-version: "3.12"
1919

2020
steps:
2121
- uses: actions/checkout@v4
@@ -29,15 +29,13 @@ jobs:
2929
- name: Install optipng, dvipng and cm-super
3030
run: sudo apt-get install -y optipng dvipng cm-super
3131

32-
- name: Install uv
33-
uses: astral-sh/setup-uv@v3
32+
- name: Install uv and Python ${{ env.python-version }}
33+
uses: astral-sh/setup-uv@v5
3434
with:
35+
python-version: ${{ env.python-version }}
3536
enable-cache: true
3637
cache-dependency-glob: pyproject.toml
37-
38-
- name: Set up Python ${{ env.python-version }}
39-
run: uv python install ${{ env.python-version }}
40-
38+
4139
- name: Install package with test dependencies
4240
run: uv sync --all-extras --dev
4341

.github/workflows/publish.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,19 @@ jobs:
1313
deploy:
1414
runs-on: ubuntu-latest
1515
env:
16-
python-version: 3.13
16+
python-version: "3.13"
1717

1818

1919
steps:
2020
- uses: actions/checkout@v4
2121

22-
- name: Install uv
23-
uses: astral-sh/setup-uv@v3
22+
- name: Install uv and Python ${{ env.python-version }}
23+
uses: astral-sh/setup-uv@v5
2424
with:
25+
python-version: ${{ env.python-version }}
2526
enable-cache: true
2627
cache-dependency-glob: pyproject.toml
2728

28-
- name: Set up Python ${{ env.python-version }}
29-
run: uv python install ${{ env.python-version }}
30-
3129
- name: Build wheels and sdist
3230
run: make build
3331

.github/workflows/tests.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-22.04, ubuntu-24.04, macos-latest, windows-latest]
19-
python-version: ["3.10", 3.11, 3.12, 3.13]
19+
# We escape with quotes so it doesn't get interpreted as float (e.g. 3.10 -> 3.1 by GA's parser)
20+
python-version: ["3.10", "3.11", "3.12", "3.13"] # add new versions when they are released
2021
fail-fast: false
2122

2223
steps:
2324
- uses: actions/checkout@v4
2425

25-
- name: Install uv
26-
uses: astral-sh/setup-uv@v3
26+
- name: Install uv and Python ${{ env.python-version }}
27+
uses: astral-sh/setup-uv@v5
2728
with:
29+
python-version: ${{ matrix.python-version }}
2830
enable-cache: true
2931
cache-dependency-glob: pyproject.toml
3032

31-
- name: Set up Python ${{ matrix.python-version }}
32-
run: uv python install ${{ matrix.python-version }}
33-
3433
- name: Install package with test dependencies
3534
run: uv sync --all-extras --dev
3635

36+
- name: Get acc-models-lhc
37+
run: git clone -b 2022 https://gitlab.cern.ch/acc-models/acc-models-lhc.git --depth 1
38+
3739
- name: Run Tests
3840
run: make tests

0 commit comments

Comments
 (0)