-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (92 loc) · 3.49 KB
/
rust.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
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
name: async-time-mock
on: push
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install rust toolchain
uses: dtolnay/[email protected]
- uses: Swatinem/[email protected]
- name: Check all features
run: cargo check --tests --all-features
- name: Check with default features
run: cargo check --tests
- name: Check without default features
run: cargo check --tests --no-default-features
- name: Check with only stream feature
run: cargo check --tests --no-default-features --features stream
- name: Check with only mock feature
run: cargo check --tests --no-default-features --features mock
- name: Check with only interval feature
run: cargo check --tests --no-default-features --features interval
- name: Check with mock and interval feature
run: cargo check --tests --no-default-features --features mock,interval
check-msrv:
name: Check with Minimum Supported Rust Version
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-24.04, windows-latest, macos-14 ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install rust toolchain
uses: dtolnay/[email protected]
- uses: Swatinem/[email protected]
- name: Check all features
run: cargo check --workspace --tests --all-features
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install rust toolchain
uses: dtolnay/[email protected]
with:
components: clippy
- uses: Swatinem/[email protected]
- name: Run clippy linter
run: cargo clippy --all-features --tests --workspace -- -D warnings
rustfmt:
name: Check formatting with rustfmt
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install rust toolchain
uses: dtolnay/[email protected]
with:
components: rustfmt
- uses: Swatinem/[email protected]
- name: Check formatting
run: cargo fmt --all -- --check
check_semver_violations:
name: Check semver violations
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/[email protected]
- name: Check semver
uses: obi1kenobi/[email protected]
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-24.04, windows-2022, macos-14 ]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install rust toolchain
uses: dtolnay/[email protected]
- uses: Swatinem/[email protected]
- name: Build
run: cargo build --all-features
- name: Run tests
run: cargo test --all-features