-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.25 KB
/
main.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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Lint
run: |
cargo clippy --all-targets -- -Dwarnings
cargo clippy --no-default-features --all-targets -- -Dwarnings
cargo clippy --features resilience --all-targets -- -Dwarnings
cargo clippy --features async --all-targets -- -Dwarnings
cargo clippy --all-features --all-targets -- -Dwarnings
- name: Run tests
run: |-
# Create test binaries
cargo build --release --bins
cargo test -- --test-threads=1
cargo test --no-default-features --test lib_test -- --test-threads=1
cargo test --features resilience -- --test-threads=1
cargo test --features async -- --test-threads=1
cargo test --all-features -- --test-threads=1