-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 931 Bytes
/
rust.yml
File metadata and controls
41 lines (32 loc) · 931 Bytes
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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.75.0, stable]
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ matrix.rust }}
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Install Rust toolchain
run: rustup component add rustfmt clippy
- name: Run clippy without default features
run: cargo clippy --all-targets --no-default-features --all-features -- --deny warnings
- name: Run rustfmt
run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate"
- name: Build
run: cargo build
- name: Run tests
run: |
cargo test
cargo test --all --all-features