-
-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (139 loc) · 4.18 KB
/
Copy pathci.yml
File metadata and controls
153 lines (139 loc) · 4.18 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# SPDX-FileCopyrightText: 2026 RAprogramm <andrey.rozanov.vl@gmail.com>
# SPDX-License-Identifier: MIT
name: ci
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
RUST_BACKTRACE: 1
jobs:
lint:
name: lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install stable toolchain (pinned by rust-toolchain.toml)
run: rustup show active-toolchain
- name: Install nightly toolchain for rustfmt
run: |
rustup toolchain install nightly --profile minimal --component rustfmt
- uses: Swatinem/rust-cache@v2
with:
shared-key: lint
- name: cargo +nightly fmt --check
run: cargo +nightly fmt --all -- --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
test:
name: test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2022]
steps:
- uses: actions/checkout@v4
- name: Show toolchain
run: rustup show active-toolchain
- uses: Swatinem/rust-cache@v2
with:
shared-key: test-${{ matrix.os }}
- name: cargo test
run: cargo test --workspace --all-features --locked
- name: cargo build --release
run: cargo build --workspace --release --locked
msrv:
name: msrv 1.95
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Verify rust-toolchain.toml pins 1.95
run: |
grep -q 'channel = "1.95.0"' rust-toolchain.toml || (echo "MSRV drifted" && exit 1)
- uses: Swatinem/rust-cache@v2
with:
shared-key: msrv
- name: cargo check --workspace
run: cargo check --workspace --all-targets --all-features --locked
audit:
name: audit
runs-on: ubuntu-24.04
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- run: cargo audit --deny warnings
deny:
name: deny
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- run: cargo deny --all-features check
schema-drift:
name: schema-drift
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: schema-drift
- name: Regenerate schemas
run: |
cargo run --bin rustmanifest-schema-export --locked -- \
--out crates/rustmanifest-schema/schemas
- name: Verify no drift
run: |
if ! git diff --exit-code crates/rustmanifest-schema/schemas; then
echo "JSON schemas are out of date. Run:"
echo " cargo run --bin rustmanifest-schema-export -- --out crates/rustmanifest-schema/schemas"
exit 1
fi
coverage:
name: coverage
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
with:
shared-key: coverage
- name: Collect coverage
run: cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-lcov
path: lcov.info
reuse:
name: reuse
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: REUSE compliance check
uses: fsfe/reuse-action@v6
mcp-conformance:
name: mcp-conformance
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Placeholder for mcp-validator suite
run: |
echo "MCP conformance suite is scaffolded; the server lands in Phase 2."
echo "This job exists so the gate is wired today and only the body changes later."