diff options
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r-- | .github/workflows/test.yml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cd938eb --- /dev/null +++ b/.github/workflows/test.yml | |||
@@ -0,0 +1,44 @@ | |||
1 | name: build | ||
2 | |||
3 | on: | ||
4 | push: | ||
5 | branches: [ "main" ] | ||
6 | pull_request: | ||
7 | branches: [ "main" ] | ||
8 | workflow_dispatch: | ||
9 | |||
10 | env: | ||
11 | SCCACHE_GHA_ENABLED: "true" | ||
12 | RUSTC_WRAPPER: "sccache" | ||
13 | CARGO_TERM_COLOR: always | ||
14 | |||
15 | jobs: | ||
16 | build: | ||
17 | |||
18 | runs-on: ubuntu-latest | ||
19 | |||
20 | steps: | ||
21 | - name: Run sccache-cache | ||
22 | uses: mozilla-actions/[email protected] | ||
23 | |||
24 | - uses: actions/checkout@v3 | ||
25 | - uses: actions-rs/toolchain@v1 | ||
26 | with: | ||
27 | toolchain: stable | ||
28 | components: rustfmt, clippy | ||
29 | override: true | ||
30 | |||
31 | - name: Run cargo test | ||
32 | uses: actions-rs/cargo@v1 | ||
33 | with: | ||
34 | command: test | ||
35 | |||
36 | - name: Run cargo check | ||
37 | uses: actions-rs/cargo@v1 | ||
38 | with: | ||
39 | command: check | ||
40 | |||
41 | - name: Run cargo clippy | ||
42 | uses: actions-rs/cargo@v1 | ||
43 | with: | ||
44 | command: clippy | ||