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 }}
@@ -29,20 +25,12 @@ jobs:
29
25
30
26
- name : Install uv
31
27
uses : astral-sh/setup-uv@v6
32
- with :
33
- 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
28
41
29
- name : Install the project
42
- run : uv sync --group test
30
+ run : uv sync --locked -- group test
43
31
44
32
- name : Run lefthook hooks
45
- run : uv run lefthook run
33
+ run : uv run --frozen lefthook run pre-commit
46
34
47
35
checks :
48
36
name : Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
@@ -54,30 +42,22 @@ jobs:
54
42
python-version : ["3.11", "3.12", "3.13"]
55
43
runs-on : [ubuntu-latest, macos-latest, windows-latest]
56
44
57
- # TODO: check when pypy3.11 is available
58
- # include:
59
- # - python-version: pypy-3.11
60
- # runs-on: ubuntu-latest
61
-
62
45
steps :
63
46
- uses : actions/checkout@v4
64
47
65
48
- name : Install uv
66
49
uses : astral-sh/setup-uv@v6
67
50
with :
68
- 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 }}
51
+ python-version : ${{ matrix.python-version }}
73
52
74
53
- name : Install the project
75
- run : uv sync --group test
54
+ run : uv sync --locked -- group test
76
55
77
56
- name : Test package
78
57
run : >-
79
- uv run pytest src docs tests -ra --cov --cov-report=xml
80
- --cov-report=term --durations=20
58
+ uv run --frozen pytest
59
+ -cov --cov-report=xml --cov-report=term --durations=20
60
+ src docs tests
81
61
82
62
- name : Upload coverage report
83
63
@@ -100,19 +80,15 @@ jobs:
100
80
- name : Install uv
101
81
uses : astral-sh/setup-uv@v6
102
82
with :
103
- 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
-
83
+ python-version : ${{ matrix.python-version }}
109
84
- name : Install the project
110
- run : uv sync --extra all --group test-all --resolution lowest-direct
85
+ run : uv sync --locked --group test --resolution lowest-direct
111
86
112
87
- name : Test package
113
88
run : >-
114
- uv run pytest src docs tests -ra --cov --cov-report=xml
115
- --cov-report=term --durations=20 --mpl
89
+ uv run --frozen pytest
90
+ --cov --cov-report=xml --cov-report=term --durations=20
91
+ src docs tests
116
92
117
93
- name : Upload coverage report
118
94
0 commit comments