File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Python Checks
2
2
3
- on : [pull_request, push]
3
+ on :
4
+ pull_request :
5
+ types : [opened, synchronize, reopened] # PR 有代码变化时运行
6
+ push :
7
+ branches :
8
+ - main
9
+
10
+ concurrency :
11
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12
+ cancel-in-progress : true
4
13
5
14
jobs :
6
15
Test :
7
16
runs-on : ubuntu-latest
8
17
steps :
9
18
- name : Checkout repository
10
- uses : actions/checkout@v2
19
+ uses : actions/checkout@v4
11
20
12
21
- name : Set up Python
13
- uses : actions/setup-python@v2
22
+ uses : actions/setup-python@v5
14
23
with :
15
24
python-version : ' 3.13'
16
25
17
26
- name : Cache Python dependencies
18
- id : cache-pip
19
27
uses : actions/cache@v3
20
28
with :
21
29
path : ~/.cache/pip
42
50
run : mypy . --ignore-missing-imports || true
43
51
44
52
- name : Run Pytest tests
45
- run : pytest
53
+ run : pytest
You can’t perform that action at this time.
0 commit comments