aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/rust.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/rust.yml')
-rw-r--r--.github/workflows/rust.yml44
1 files changed, 31 insertions, 13 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 79251f5..f1cc36d 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -1,22 +1,40 @@
1name: Rust 1name: Check and Lint
2 2
3on: 3on:
4 push:
5 branches: [ main ]
6 pull_request: 4 pull_request:
7 branches: [ main ] 5 push:
8 6 branches:
7 - main
8
9env: 9env:
10 CARGO_TERM_COLOR: always 10 CARGO_TERM_COLOR: always
11 11
12jobs: 12jobs:
13 build: 13 check:
14 14 name: Check
15 runs-on: ubuntu-latest
16 steps:
17 - uses: actions/checkout@v2
18 - uses: actions-rs/toolchain@v1
19 with:
20 profile: minimal
21 toolchain: stable
22 override: true
23 - uses: actions-rs/cargo@v1
24 with:
25 command: check
26 fmt:
27 name: Rustfmt
15 runs-on: ubuntu-latest 28 runs-on: ubuntu-latest
16
17 steps: 29 steps:
18 - uses: actions/checkout@v3 30 - uses: actions/checkout@v2
19 - name: Build 31 - uses: actions-rs/toolchain@v1
20 run: cargo build --verbose 32 with:
21 - name: Run tests 33 profile: minimal
22 run: cargo test --verbose 34 toolchain: stable
35 override: true
36 - run: rustup component add rustfmt
37 - uses: actions-rs/cargo@v1
38 with:
39 command: fmt
40 args: --all -- --check