-
Notifications
You must be signed in to change notification settings - Fork 16
55 lines (46 loc) · 1.15 KB
/
rust-checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: Rust checks
on:
push:
branches:
- main
- release-*
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
main:
name: Run check, test and lints
runs-on: drink-runner
env:
CARGO_INCREMENTAL: 0
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v1
with:
targets: wasm32-unknown-unknown
components: clippy rustfmt
- name: Add rust-src
shell: bash
run: rustup component add rust-src
- name: Run format checks
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all
- name: Run linter
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets -- --no-deps -D warnings
- name: Run unit test suite
uses: actions-rs/cargo@v1
with:
command: test
- name: Run tests for examples
shell: bash
run: make test_examples