Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Commit 945ccdb

Browse files
authored
add rustup lint and clippy (#14)
1 parent c01860d commit 945ccdb

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.github/workflows/test.yaml

+20-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
# under the License.
1717

1818
name: Python test
19-
on: [push, pull_request]
19+
on:
20+
push:
21+
branches: [ main ]
22+
pull_request:
23+
branches: [ main ]
2024

2125
jobs:
2226
test:
@@ -30,19 +34,27 @@ jobs:
3034
steps:
3135
- uses: actions/checkout@v2
3236

33-
- name: Setup Rust toolchain
34-
run: |
35-
rustup toolchain install stable
36-
rustup default stable
37-
rustup component add rustfmt
38-
3937
- name: Cache Cargo
4038
uses: actions/cache@v2
4139
with:
4240
path: /home/runner/.cargo
4341
key: cargo-maturin-cache-${{ hashFiles('Cargo.lock') }}
4442

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
4658
with:
4759
python-version: ${{ matrix.python-version }}
4860

0 commit comments

Comments
 (0)