-
Notifications
You must be signed in to change notification settings - Fork 10
113 lines (86 loc) · 2.67 KB
/
Copy pathci.yml
File metadata and controls
113 lines (86 loc) · 2.67 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
on: [ push, pull_request ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
test:
name: Rust ${{ matrix.channel }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
channel: [ stable, beta, nightly ]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust ${{ matrix.channel }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.channel }}
components: clippy
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-bin: false
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Check powerset
run: cargo hack check --feature-powerset --optional-deps
- name: Run tests
run: cargo hack test --workspace --feature-powerset --optional-deps
- name: Run clippy
run: cargo clippy
publish_dry_run:
name: Publish dry run
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Publish dry run
run: cargo publish --package inno --dry-run
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install cargo-msrv
uses: moonrepo/setup-rust@v1
with:
bins: cargo-hack, cargo-msrv
- name: Verify MSRV
id: verify
run: cargo hack --workspace msrv verify
- name: Find actual MSRV
if: ${{ failure() && steps.verify.conclusion == 'failure' }}
run: cargo hack --workspace msrv find
minimal_versions:
name: Minimal dependency versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
cache-bin: false
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-minimal-versions
- name: Add nightly Rust toolchain
run: rustup toolchain add nightly --profile minimal --no-self-update
- name: Check minimal versions
run: cargo minimal-versions check --workspace
unused_dependencies:
name: Unused dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Check for unused dependencies
uses: bnjbvr/cargo-machete@main