aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/rust.yml47
1 files changed, 33 insertions, 14 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index f1cc36d..7629aca 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -1,5 +1,4 @@
1name: Check and Lint 1name: ci
2
3on: 2on:
4 pull_request: 3 pull_request:
5 push: 4 push:
@@ -11,11 +10,13 @@ env:
11 10
12jobs: 11jobs:
13 check: 12 check:
14 name: Check 13 name: check
15 runs-on: ubuntu-latest 14 runs-on: ubuntu-latest
16 steps: 15 steps:
17 - uses: actions/checkout@v2 16 - name: Checkout repository
18 - uses: actions-rs/toolchain@v1 17 uses: actions/checkout@v2
18 - name: Install Rust
19 uses: actions-rs/toolchain@v1
19 with: 20 with:
20 profile: minimal 21 profile: minimal
21 toolchain: stable 22 toolchain: stable
@@ -24,17 +25,35 @@ jobs:
24 with: 25 with:
25 command: check 26 command: check
26 fmt: 27 fmt:
27 name: Rustfmt 28 name: rustfmt
28 runs-on: ubuntu-latest 29 runs-on: ubuntu-latest
29 steps: 30 steps:
30 - uses: actions/checkout@v2 31 - name: Checkout repository
31 - uses: actions-rs/toolchain@v1 32 uses: actions/checkout@v2
32 with: 33 - name: Install Rust
34 uses: actions-rs/toolchain@v1
35 with:
36 toolchain: stable
33 profile: minimal 37 profile: minimal
38 override: true
39 components: rustfmt
40 - name: Check formatting
41 run: |
42 cargo fmt --all -- --check
43 clippy:
44 name: clippy
45 runs-on: ubuntu-latest
46 steps:
47 - name: Checkout repository
48 uses: actions/checkout@v2
49 - name: Install Rust
50 uses: actions-rs/toolchain@v1
51 with:
34 toolchain: stable 52 toolchain: stable
53 components: clippy
35 override: true 54 override: true
36 - run: rustup component add rustfmt 55 - name: Lint \w Clippy
37 - uses: actions-rs/cargo@v1 56 uses: actions-rs/clippy-check@v1
38 with: 57 with:
39 command: fmt 58 token: ${{ secrets.GITHUB_TOKEN }}
40 args: --all -- --check 59