-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (52 loc) · 1.73 KB
/
Copy pathCI.yml
File metadata and controls
58 lines (52 loc) · 1.73 KB
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
56
57
on:
push:
branches:
- main
pull_request:
name: CI
jobs:
lint-rust:
name: Lint Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- run: rustup component add clippy rustfmt
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
env:
RUSTFLAGS: -D warnings
run: cargo clippy --workspace
- name: Clippy (all features)
env:
RUSTFLAGS: -D warnings
run: cargo clippy --workspace --all-features
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --workspace --all-features --no-deps --document-private-items
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- run: cargo test
check-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- run: rustup target add wasm32-unknown-unknown
- run: cargo check --target wasm32-unknown-unknown
minimal-versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- run: cargo +nightly update -Z minimal-versions
- run: cargo test