-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (40 loc) · 1017 Bytes
/
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
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:
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