Skip to content

Commit d0722b4

Browse files
committed
Clean up CI workflows
- Inline setup-venv composite action into each workflow - Remove setup-python (uv handles Python installation) - Bump setup-uv to v8 - Drop redundant enable-cache on GitHub-hosted runners - Remove unused step IDs and redundant uv sync in publish - Hardcode module name in docs instead of fragile ls discovery - Rename test_local.yaml to test_full.yaml - Rename "Python Tests" workflow to "CI"
1 parent c04ee01 commit d0722b4

5 files changed

Lines changed: 23 additions & 69 deletions

File tree

.github/actions/setup-venv/action.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/docs.yaml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313

1414
on:
1515
workflow_run:
16-
workflows: [Python Tests]
16+
workflows: [CI]
1717
types:
1818
- completed
1919
branches:
@@ -30,20 +30,11 @@ jobs:
3030
url: ${{ steps.deployment.outputs.page_url }}
3131
steps:
3232
- uses: actions/checkout@v6
33-
- name: Install uv
34-
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098
35-
with:
36-
enable-cache: true
37-
- name: Set up Python
38-
uses: actions/setup-python@v6
39-
with:
40-
python-version-file: pyproject.toml
33+
- uses: astral-sh/setup-uv@v8
4134
- name: Install the project
4235
run: uv sync --only-group docs
4336
- name: Build docs
44-
run: |
45-
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
46-
uv run pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
37+
run: uv run pdoc src/rbc -o docs_build -t docs/pdoc-theme --docformat google
4738
- name: Setup Pages
4839
uses: actions/configure-pages@v6
4940
- name: Upload artifact

.github/workflows/publish.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v6
21+
- uses: astral-sh/setup-uv@v8
2122

22-
- name: Setup venv
23-
uses: ./.github/actions/setup-venv
24-
25-
- name: Freeze dependencies and build
23+
- name: Build
2624
run: |
2725
uv sync --no-dev --no-install-project
2826
uv build

.github/workflows/test.yaml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python Tests
1+
name: CI
22

33
permissions:
44
contents: read
@@ -20,11 +20,10 @@ jobs:
2020
os: [ubuntu-latest, macos-latest, windows-latest]
2121
steps:
2222
- uses: actions/checkout@v6
23-
- name: Setup venv
24-
uses: ./.github/actions/setup-venv
23+
- uses: astral-sh/setup-uv@v8
24+
- run: uv sync
2525

2626
- name: Run non-ubuntu quick tests
27-
id: run-unit-tests
2827
if: matrix.os != 'ubuntu-latest'
2928
shell: bash
3029
run: >
@@ -36,7 +35,6 @@ jobs:
3635
--verbose tests
3736
3837
- name: Run ubuntu quick tests
39-
id: run-quick-ubuntu-tests
4038
if: matrix.os == 'ubuntu-latest'
4139
shell: bash
4240
run: >
@@ -59,8 +57,8 @@ jobs:
5957
runs-on: ubuntu-latest
6058
steps:
6159
- uses: actions/checkout@v6
62-
- name: Setup venv
63-
uses: ./.github/actions/setup-venv
60+
- uses: astral-sh/setup-uv@v8
61+
- run: uv sync
6462
- name: Check generated files are up-to-date
6563
run: |
6664
uv run scripts/generate_bids_tools.py
@@ -70,10 +68,8 @@ jobs:
7068
runs-on: ubuntu-latest
7169
steps:
7270
- uses: actions/checkout@v6
73-
- name: Setup venv
74-
uses: ./.github/actions/setup-venv
75-
with:
76-
only-dev: true
71+
- uses: astral-sh/setup-uv@v8
72+
- run: uv sync --only-dev
7773
- name: Ruff format
7874
run: uv run ruff format --check
7975
- name: Ruff check
@@ -83,16 +79,14 @@ jobs:
8379
runs-on: ubuntu-latest
8480
steps:
8581
- uses: actions/checkout@v6
86-
- name: Setup venv
87-
uses: ./.github/actions/setup-venv
88-
- run: |
89-
uv run mypy .
82+
- uses: astral-sh/setup-uv@v8
83+
- run: uv sync
84+
- run: uv run mypy .
9085

9186
deptry:
9287
runs-on: ubuntu-latest
9388
steps:
9489
- uses: actions/checkout@v6
95-
- name: Setup venv
96-
uses: ./.github/actions/setup-venv
97-
- run: |-
98-
uv run deptry ./src
90+
- uses: astral-sh/setup-uv@v8
91+
- run: uv sync
92+
- run: uv run deptry ./src
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88
- tests/**
99
- pyproject.toml
1010
- uv.lock
11-
- .github/workflows/test_local.yaml
12-
- .github/actions/setup-venv/action.yaml
11+
- .github/workflows/test_full.yaml
1312
workflow_dispatch:
1413
inputs:
1514
no_cleanup:
@@ -26,8 +25,10 @@ jobs:
2625
runs-on: arcana
2726
steps:
2827
- uses: actions/checkout@v6
29-
- name: Setup venv
30-
uses: ./.github/actions/setup-venv
28+
- uses: astral-sh/setup-uv@v8
29+
with:
30+
enable-cache: true # not automatic on self-hosted runners
31+
- run: uv sync
3132

3233
- name: Run all tests
3334
shell: bash

0 commit comments

Comments
 (0)