-
Notifications
You must be signed in to change notification settings - Fork 46
53 lines (42 loc) · 1.12 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Rust
on:
push:
branches: [dev]
pull_request:
branches: [dev]
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
build_and_test:
if: ( ! github.event.pull_request.draft )
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/[email protected]
- name: "Build"
run: cargo build
- name: "Test"
run: cargo test --lib --bins --tests --examples --workspace
- name: "Check documentation"
# env:
# RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --workspace --lib --document-private-items --examples
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Nightly with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt
- name: "Check formatting"
run: cargo +nightly fmt --check --all