-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (52 loc) · 1.3 KB
/
branch.yaml
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
name: Branch
on:
push:
branches: [ "*", "!main" ]
pull_request:
branches: [ "*", "!main" ]
env:
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- stable
- beta
- nightly
target:
- x86_64-unknown-linux-gnu
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.version }}
override: true
components: rustfmt
- name: clean
run: cargo clean
- name: build
run: cargo build --all-features
env:
RUST_BACKTRACE: 1
- name: test
run: cargo test --all-features
env:
RUST_BACKTRACE: 1
- name: ignored test
run: cargo test --all-features -- --ignored || true
env:
RUST_BACKTRACE: 1
if: matrix.version == 'nightly'
- name: check formatting
run: cargo fmt -- --check
- name: install audit
run: cargo install cargo-audit
- name: audit check
run: cargo audit
- name: install cargo-hack
run: cargo install cargo-hack --locked
- name: cargo check all features
run: cargo hack check --feature-powerset --no-dev-deps