@@ -11,9 +11,8 @@ permissions:
1111 contents : read
1212
1313env :
14- MINIMUM_PYTHON_VERSION : " 3.9"
15- UV_VERSION : " 0.4.18"
16- UV_CACHE_DIR : /tmp/.uv-cache
14+ MINIMUM_PYTHON_VERSION : " 3.11"
15+ UV_VERSION : " 0.8.13"
1716
1817# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that
1918# we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5
@@ -24,14 +23,15 @@ concurrency:
2423jobs :
2524 fmt :
2625 runs-on : ubuntu-latest
27- name : ubuntu / 3.9 / fmt
26+ name : ubuntu / 3.11 / fmt
2827 steps :
29- - uses : actions/checkout@v4
28+ - uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
3029 with :
30+ persist-credentials : false
3131 submodules : true
3232
3333 - name : Set up the python ${{ env.MINIMUM_PYTHON_VERSION }}
34- uses : actions/setup-python@v5
34+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
3535 id : setup-python
3636 with :
3737 python-version : ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -40,42 +40,27 @@ jobs:
4040 # ----- setup uv and load cache -----
4141 # ----------------------------------------------
4242 - name : Set up uv
43- run : curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
44-
45- - name : Restore uv cache
46- uses : actions/cache@v4
47- with :
48- path : /tmp/.uv-cache
49- key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
50- restore-keys : |
51- uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
52- uv-${{ runner.os }}
53-
54- - name : Load cached venv
55- id : cached-venv
56- uses : actions/cache@v4
43+ uses : astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
5744 with :
58- path : .venv
59- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }}
45+ version : ${{ env.UV_VERSION }}
46+ enable-cache : true
6047
6148 - name : Install dependencies
62- if : steps.cached-venv.outputs.cache-hit != 'true'
6349 run : make install-dev
6450
6551 - name : check formatting
6652 run : make check-fmt
6753
68- - name : Minimize uv cache
69- run : uv cache prune --ci
7054 lint :
7155 runs-on : ubuntu-latest
72- name : ubuntu / 3.9 / lint
56+ name : ubuntu / 3.11 / lint
7357 steps :
74- - uses : actions/checkout@v4
58+ - uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
7559 with :
60+ persist-credentials : false
7661 submodules : true
7762 - name : Set up the python ${{ env.MINIMUM_PYTHON_VERSION }}
78- uses : actions/setup-python@v5
63+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
7964 id : setup-python
8065 with :
8166 python-version : ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -84,41 +69,27 @@ jobs:
8469 # ----- setup uv and load cache -----
8570 # ----------------------------------------------
8671 - name : Set up uv
87- run : curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
88-
89- - name : Restore uv cache
90- uses : actions/cache@v4
72+ uses : astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
9173 with :
92- path : /tmp/.uv-cache
93- key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
94- restore-keys : |
95- uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
96- uv-${{ runner.os }}
97-
98- - name : Load cached venv
99- id : cached-venv
100- uses : actions/cache@v4
101- with :
102- path : .venv
103- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }}
74+ version : ${{ env.UV_VERSION }}
75+ enable-cache : true
76+
10477 - name : Install dependencies
105- if : steps.cached-venv.outputs.cache-hit != 'true'
10678 run : make install-dev
79+
10780 - name : lint code
10881 run : make lint
10982
110- - name : Minimize uv cache
111- run : uv cache prune --ci
112-
11383 type-check :
11484 runs-on : ubuntu-latest
115- name : ubuntu / 3.9 / type-check
85+ name : ubuntu / 3.11 / type-check
11686 steps :
117- - uses : actions/checkout@v4
87+ - uses : actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
11888 with :
89+ persist-credentials : false
11990 submodules : true
12091 - name : Set up the python ${{ env.MINIMUM_PYTHON_VERSION }}
121- uses : actions/setup-python@v5
92+ uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
12293 id : setup-python
12394 with :
12495 python-version : ${{ env.MINIMUM_PYTHON_VERSION }}
@@ -127,32 +98,17 @@ jobs:
12798 # ----- setup uv and load cache -----
12899 # ----------------------------------------------
129100 - name : Set up uv
130- run : curl -LsSf https://astral.sh/uv/${{ env.UV_VERSION }}/install.sh | sh
131-
132- - name : Restore uv cache
133- uses : actions/cache@v4
134- with :
135- path : /tmp/.uv-cache
136- key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
137- restore-keys : |
138- uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
139- uv-${{ runner.os }}
140-
141- - name : Load cached venv
142- id : cached-venv
143- uses : actions/cache@v4
101+ uses : astral-sh/setup-uv@4e1e303f7dafb1a3ec7770a507052543f593ad96 # v6.6.0
144102 with :
145- path : .venv
146- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/uv.lock') }}
103+ version : ${{ env.UV_VERSION }}
104+ enable-cache : true
105+
147106 - name : Install dependencies
148- if : steps.cached-venv.outputs.cache-hit != 'true'
149107 run : make install-dev
108+
150109 - name : type-check code
151110 run : make type-check
152111
153- - name : Minimize uv cache
154- run : uv cache prune --ci
155-
156112 # https://github.com/marketplace/actions/alls-green#why used for branch protection checks
157113 check-check :
158114 if : always()
@@ -164,7 +120,6 @@ jobs:
164120 permissions : {}
165121 steps :
166122 - name : Decide whether the needed jobs succeeded or failed
167- uses : re-actors/alls-green@release/v1
123+ uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
168124 with :
169125 jobs : ${{ toJSON(needs) }}
170- allowed-failures : upload-coverage
0 commit comments