-
Notifications
You must be signed in to change notification settings - Fork 5
97 lines (84 loc) · 2.54 KB
/
cont_integration.yml
File metadata and controls
97 lines (84 loc) · 2.54 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
on: [push, pull_request]
name: CI
permissions: {}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt:
name: Rust fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: stable
components: rustfmt
cache: true
- name: Check fmt
run: cargo fmt --all -- --check
# Clippy lints
clippy:
name: Clippy (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
matrix:
features:
- --no-default-features
- --all-features
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: stable
components: clippy
cache: true
- name: Run Clippy
run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings
# Build and test
test:
name: Test (stable, ${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
features:
- --no-default-features
- --all-features
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: stable
cache: true
- name: Build
run: cargo build ${{ matrix.features }} --verbose
- name: Run unit tests
run: cargo test ${{ matrix.features }} --lib --verbose
- name: Run doc tests
run: cargo test ${{ matrix.features }} --doc --verbose
# MSRV
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
persist-credentials: false
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1
with:
toolchain: 1.75.0
cache: true
- name: Check MSRV
run: cargo check --all-features