-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (45 loc) · 1.12 KB
/
build_and_test.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
53
54
55
56
57
name: Build and Test
on:
push:
branches:
- main
- release
pull_request:
defaults:
run:
shell: bash -euxo pipefail {0}
env:
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
jobs:
cargo-deny:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
build:
strategy:
matrix:
os: [ubuntu-latest]
toolchain: [stable, beta]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- name: Run clippy
run: cargo clippy --workspace
- name: Run cargo check
run: cargo check --workspace
- name: Run the tests
run: cargo test --workspace
- name: Check documentation generation
run: cargo doc --workspace --no-deps --document-private-items
env:
RUSTDOCFLAGS: "-Dwarnings -Arustdoc::private_intra_doc_links"
- name: Check formatting
if: ${{ !cancelled() }}
run: cargo fmt --all -- --check