-
Notifications
You must be signed in to change notification settings - Fork 46
70 lines (56 loc) · 1.53 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build & Test Rust
on:
push:
branches: [main, staging, trying]
pull_request:
branches: [main]
env:
CARGO_INCREMENTAL: 0
# TODO: Would be nice to disable warnings here too, but there are too many of them.
RUSTFLAGS: "-W rust-2021-compatibility"
RUST_BACKTRACE: short
NEXTEST_PROFILE: ci
CI: 1
jobs:
build-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.72.0
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Build cynic
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace
- name: Install nextest
shell: bash
run: |
curl -LsSf https://get.nexte.st/0.9/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Build tests
shell: bash
run: |
cargo nextest run --workspace --all-features --no-run
- name: Run tests
shell: bash
run: |
cargo nextest run --workspace --all-features
- name: Build example tests
shell: bash
run: |
cargo nextest run --workspace --examples --no-run
- name: Run example tests
shell: bash
run: |
cargo nextest run --workspace --examples
- name: Build & run doctests
shell: bash
run: |
cargo test --doc --workspace