@@ -20,33 +20,28 @@ jobs:
20
20
21
21
- name : 🏗 Install uv
22
22
uses : astral-sh/setup-uv@v2
23
+ with :
24
+ enable-cache : true
25
+ cache-dependency-glob : " uv.lock"
26
+ cache-local-path : ${{ env.UV_CACHE_DIR }}
23
27
24
28
- name : 🏗 Set up Python
25
29
uses : actions/setup-python@v5
26
30
with :
27
31
python-version-file : " .python-version"
28
32
29
- - name : 🏗 Restore uv cache
30
- uses : actions/cache@v4
31
- with :
32
- path : /tmp/.uv-cache
33
- key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
34
- restore-keys : |
35
- uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
36
- uv-${{ runner.os }}
37
-
38
33
- name : 🏗 Install the project
39
34
run : uv sync --locked --dev
40
35
41
36
# Following steps cannot run by pre-commit.ci as repo = local
42
37
- name : Run mypy
43
- run : uv run mypy deebot_client/
38
+ run : uv run --frozen mypy deebot_client/
39
+
44
40
- name : Pylint review
45
- run : uv run pylint deebot_client/
41
+ run : uv run --frozen pylint deebot_client/
42
+
46
43
- name : Verify no getLogger usages
47
44
run : scripts/check_getLogger.sh
48
- - name : Minimize uv cache
49
- run : uv cache prune --ci
50
45
51
46
tests :
52
47
runs-on : " ubuntu-latest"
@@ -56,29 +51,27 @@ jobs:
56
51
python-version :
57
52
- " 3.12"
58
53
steps :
59
- - uses : " actions/checkout@v4"
60
- - name : Set up uv
61
- # Install latest uv version using the installer
62
- run : curl -LsSf https://astral.sh/uv/install.sh | sh
63
- - name : Set up Python ${{ matrix.python-version }}
64
- run : uv python install ${{ matrix.python-version }}
65
- - name : Restore uv cache
66
- uses : actions/cache@v4
54
+ - name : ⤵️ Checkout repository
55
+ uses : actions/checkout@v4
56
+
57
+ - name : 🏗 Install uv
58
+ uses : astral-sh/setup-uv@v2
67
59
with :
68
- path : /tmp/.uv-cache
69
- key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}-${{ matrix.python-version }}
70
- restore-keys : |
71
- uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}-${{ matrix.python-version }}
72
- uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
73
- uv-${{ runner.os }}
74
- - name : Install the project
60
+ enable-cache : true
61
+ cache-dependency-glob : " uv.lock"
62
+ cache-local-path : ${{ env.UV_CACHE_DIR }}
63
+
64
+ - name : 🏗 Set up Python ${{ matrix.python-version }}
65
+ run : uv python install ${{ matrix.python-version }}
66
+
67
+ - name : 🏗 Install the project
75
68
run : uv sync --locked --dev
69
+
76
70
- name : Run pytest
77
- run : uv run pytest tests --cov=./ --cov-report=xml
71
+ run : uv run --frozen pytest tests --cov=./ --cov-report=xml
72
+
78
73
- name : Upload coverage to Codecov
79
74
uses : codecov/codecov-action@v4
80
75
with :
81
76
token : ${{ secrets.CODECOV_TOKEN }}
82
77
fail_ci_if_error : true
83
- - name : Minimize uv cache
84
- run : uv cache prune --ci
0 commit comments