1
1
name : CI
2
-
3
- permissions :
4
- contents : read
5
- packages : read
2
+ permissions : read-all
6
3
7
4
on :
8
5
workflow_dispatch :
9
6
pull_request :
10
7
push :
11
- branches :
12
- - main
8
+ branches : [main]
13
9
14
10
concurrency :
15
11
group : ${{ github.workflow }}-${{ github.ref }}
@@ -31,18 +27,12 @@ jobs:
31
27
uses : astral-sh/setup-uv@v6
32
28
with :
33
29
enable-cache : true
34
- cache-dependency-glob : " uv.lock"
35
-
36
- - name : " Set up Python"
37
- uses : actions/setup-python@v5
38
- with :
39
- python-version-file : " .python-version"
40
30
41
31
- name : Install the project
42
- run : uv sync --group test
32
+ run : uv sync --locked -- group test
43
33
44
34
- name : Run lefthook hooks
45
- run : uv run lefthook run
35
+ run : uv run --frozen lefthook run pre-commit
46
36
47
37
checks :
48
38
name : Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
@@ -66,18 +56,16 @@ jobs:
66
56
uses : astral-sh/setup-uv@v6
67
57
with :
68
58
enable-cache : true
69
- cache-dependency-glob : " uv.lock"
70
-
71
- - name : Set up Python ${{ matrix.python-version }}
72
- run : uv python install ${{ matrix.python-version }}
59
+ python-version : ${{ matrix.python-version }}
73
60
74
61
- name : Install the project
75
- run : uv sync --group test
62
+ run : uv sync --locked -- group test
76
63
77
64
- name : Test package
78
65
run : >-
79
- uv run pytest src docs tests -ra --cov --cov-report=xml
80
- --cov-report=term --durations=20
66
+ uv run --frozen pytest
67
+ -cov --cov-report=xml --cov-report=term --durations=20
68
+ src docs tests
81
69
82
70
- name : Upload coverage report
83
71
@@ -101,18 +89,15 @@ jobs:
101
89
uses : astral-sh/setup-uv@v6
102
90
with :
103
91
enable-cache : true
104
- cache-dependency-glob : " uv.lock"
105
-
106
- - name : Set up Python ${{ matrix.python-version }}
107
- run : uv python install ${{ matrix.python-version }}
108
-
92
+ python-version : ${{ matrix.python-version }}
109
93
- name : Install the project
110
- run : uv sync --extra all --group test-all --resolution lowest-direct
94
+ run : uv sync --locked --group test --resolution lowest-direct
111
95
112
96
- name : Test package
113
97
run : >-
114
- uv run pytest src docs tests -ra --cov --cov-report=xml
115
- --cov-report=term --durations=20 --mpl
98
+ uv run --frozen pytest
99
+ --cov --cov-report=xml --cov-report=term --durations=20
100
+ src docs tests
116
101
117
102
- name : Upload coverage report
118
103
0 commit comments