-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 1.15 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
36
37
38
39
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
channel:
- stable
- beta
- nightly
features:
- "--features=''"
- "--all-features"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain
run: rustup default ${{ matrix.channel }} && rustup component add clippy && cargo install cargo-llvm-cov
- name: Build
run: RUSTFLAGS="-Dwarnings" cargo build --verbose --no-default-features ${{ matrix.features }}
- name: Run tests
- run: RUSTFLAGS="-Dwarnings" cargo test --verbose --no-default-features ${{ matrix.features }}
- name: Coverage
run: RUSTFLAGS="-Dwarnings" cargo llvm-cov test --text --verbose --no-default-features ${{ matrix.features }}
- name: Build docs
run: RUSTDOCFLAGS="-Dwarnings" cargo doc --verbose --no-default-features --no-deps ${{ matrix.features }}
- name: Run clippy
run: RUSTFLAGS="-Dwarnings" cargo clippy --verbose --no-default-features ${{ matrix.features }}