File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 16
16
# under the License.
17
17
18
18
name : Python test
19
- on : [push, pull_request]
19
+ on :
20
+ push :
21
+ branches : [ main ]
22
+ pull_request :
23
+ branches : [ main ]
20
24
21
25
jobs :
22
26
test :
@@ -30,19 +34,27 @@ jobs:
30
34
steps :
31
35
- uses : actions/checkout@v2
32
36
33
- - name : Setup Rust toolchain
34
- run : |
35
- rustup toolchain install stable
36
- rustup default stable
37
- rustup component add rustfmt
38
-
39
37
- name : Cache Cargo
40
38
uses : actions/cache@v2
41
39
with :
42
40
path : /home/runner/.cargo
43
41
key : cargo-maturin-cache-${{ hashFiles('Cargo.lock') }}
44
42
45
- - uses : actions/setup-python@v2
43
+ - name : Setup Rust Toolchain
44
+ uses : actions-rs/toolchain@v1
45
+ with :
46
+ toolchain : stable
47
+ profile : default
48
+ override : true
49
+
50
+ - name : Cargo Clippy
51
+ run : cargo clippy
52
+
53
+ - name : Cargo Check
54
+ run : cargo check --all --frozen --locked
55
+
56
+ - name : Setup Python Toolchain
57
+ uses : actions/setup-python@v2
46
58
with :
47
59
python-version : ${{ matrix.python-version }}
48
60
You can’t perform that action at this time.
0 commit comments