-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (42 loc) · 1.14 KB
/
main.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
name: Main
on:
push:
branches:
- master
- main
pull_request:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
components: rustfmt, clippy
profile: minimal
override: true
# selecting a toolchain should happen before the plugin, as the cache uses the current rustc version as its cache key
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo make
uses: davidB/rust-cargo-make@v1
- name: Format
run: cargo make fmt
- name: Clippy
run: cargo make clippy
# fails if schemas changes not committed
- name: Check schemas up-to-date
run: |
cargo make generate-all-schemas
git diff --exit-code schemas
- name: Audit dependencies
run: |
cargo install --locked cargo-audit
cargo make audit