-
Notifications
You must be signed in to change notification settings - Fork 13
35 lines (34 loc) · 1 KB
/
rust.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
on: [push, pull_request]
name: build
jobs:
lint:
name: Format and Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.81.0 # We want to use a modern version of rust for better lints
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --all -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.32 # Ensure that tests past using MSRV
override: true
- name: Run cargo test
run: cargo test
- name: Run cargo test for no-std
run: cargo test --no-default-feature