@@ -67,85 +67,53 @@ jobs:
6767 with :
6868 token : ${{ secrets.CODECOV_TOKEN }}
6969
70- build-devcontainer :
71- name : Build devcontainer image
72- runs-on : ubuntu-latest
73- permissions :
74- packages : write
75- outputs :
76- image : ${{ steps.image.outputs.name }}
77- steps :
78- - name : Checkout repository
79- uses : actions/checkout@v6
80-
81- - name : Log in to GitHub Container Registry
82- uses : docker/login-action@v3
83- with :
84- registry : ghcr.io
85- username : ${{ github.actor }}
86- password : ${{ secrets.GITHUB_TOKEN }}
87-
88- - name : Set up Docker Buildx
89- uses : docker/setup-buildx-action@v3
90-
91- - name : Compute image path
92- id : image
93- run : |
94- repo_lower=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')
95- echo "name=ghcr.io/$repo_lower/devcontainer:${{ github.sha }}" >> $GITHUB_OUTPUT
96- echo "cache-ref=ghcr.io/$repo_lower/devcontainer:cache" >> $GITHUB_OUTPUT
97-
98- - name : Build and push devcontainer image
99- uses : docker/build-push-action@v6
100- with :
101- context : .
102- file : .devcontainer/Dockerfile
103- push : true
104- tags : ${{ steps.image.outputs.name }}
105- cache-from : |
106- type=registry,ref=${{ steps.image.outputs.cache-ref }}
107- type=registry,ref=ghcr.io/${{ github.repository_owner }}/devcontainer:latest
108- cache-to : type=registry,ref=${{ steps.image.outputs.cache-ref }},mode=max
109-
11070 build-doc :
11171 name : Build and test documentation
112- needs : build-devcontainer
11372 runs-on : ubuntu-latest
114- container :
115- image : ${{ needs.build-devcontainer.outputs.image }}
11673 steps :
11774 - name : Checkout repository
11875 uses : actions/checkout@v6
11976
120- - name : Sync project installation
121- run : uv pip install --python /opt/venv/bin/python -e '.[full]' --group doc
77+ - name : Set up uv
78+ uses : astral-sh/setup-uv@v7
79+ with :
80+ python-version : ' 3.14'
81+
82+ - uses : ./.github/actions/install-deps
83+ with :
84+ options : full
85+ groups : doc
12286
12387 - name : Build Documentation
12488 working-directory : docs
125- run : make dirhtml
89+ run : uv run make dirhtml
12690
12791 - name : Test Documentation
12892 working-directory : docs
129- run : make doctest
93+ run : uv run make doctest
13094
13195 code-quality :
13296 name : Code quality (ty and pre-commit hooks)
133- needs : build-devcontainer
13497 runs-on : ubuntu-latest
135- container :
136- image : ${{ needs.build-devcontainer.outputs.image }}
13798 steps :
13899 - name : Checkout repository
139100 uses : actions/checkout@v6
140101
141- - name : Sync project installation
142- run : uv pip install --python /opt/venv/bin/python -e '.[full]' --group check --group test --group plot
102+ - name : Set up uv
103+ uses : astral-sh/setup-uv@v7
104+ with :
105+ python-version : ' 3.14'
106+
107+ - uses : ./.github/actions/install-deps
108+ with :
109+ options : full
110+ groups : check test plot
143111
144112 - name : Configure git safe directory
145113 run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
146114
147115 - name : Run pre-commit hooks
148- run : pre-commit run --all-files
116+ run : uv run pre-commit run --all-files
149117
150118 - name : Run ty
151- run : ty check --output-format=github
119+ run : uv run ty check --output-format=github
0 commit comments