File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -29,23 +29,32 @@ jobs:
29
29
runs-on : ubuntu-22.04
30
30
steps :
31
31
- uses : actions/checkout@v5
32
- - uses : actions/setup-python@v6
33
- with :
34
- python-version : " 3.11"
35
32
36
- - name : Mypy cache
37
- uses : actions/cache@v4
33
+ - name : Install uv and set Python version
34
+ uses : astral-sh/setup-uv@v6
38
35
with :
39
- path : .mypy_cache
40
- key : mypy-${{ hashFiles('requirements/typing.txt') }}
36
+ python-version : " 3.11"
37
+ # TODO: Avoid activating environment like this
38
+ # see: https://github.com/astral-sh/setup-uv/tree/v6/?tab=readme-ov-file#activate-environment
39
+ activate-environment : true
40
+ enable-cache : true
41
41
42
42
- name : Install dependencies
43
43
env :
44
44
FREEZE_REQUIREMENTS : 1
45
45
timeout-minutes : 20
46
46
run : |
47
- pip install -e '.[pytorch-all,fabric-all]' -r requirements/typing.txt
48
- pip list
47
+ uv pip install '.[pytorch-all,fabric-all]' -r requirements/typing.txt
48
+ uv pip list
49
+
50
+ - name : mypy cache
51
+ uses : actions/cache@v4
52
+ with :
53
+ path : .mypy_cache
54
+ key : mypy-${{ hashFiles('requirements/typing.txt') }}
49
55
50
56
- name : Check typing
51
57
run : mypy
58
+
59
+ - name : Minimize uv cache
60
+ run : uv cache prune --ci
You can’t perform that action at this time.
0 commit comments