Skip to content

Commit b190bb3

Browse files
Bryan Chaskoclaude
andcommitted
ci: cargo test + clippy + readme-lint on every PR
- cargo test and clippy run on all pushes - readme-lint pulls from heraldstack-mcp and validates changed .md files on PRs - fail fast: clippy treats warnings as errors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4a0dce1 commit b190bb3

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: cargo test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- uses: Swatinem/rust-cache@v2
16+
- run: cargo test
17+
- run: cargo clippy -- -D warnings
18+
- run: cargo fmt --check
19+
20+
readme-lint:
21+
name: readme-lint
22+
runs-on: ubuntu-latest
23+
if: github.event_name == 'pull_request'
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- uses: dtolnay/rust-toolchain@stable
29+
- uses: Swatinem/rust-cache@v2
30+
with:
31+
workspaces: . -> target
32+
cache-key: readme-lint
33+
- name: build readme-lint
34+
run: |
35+
git clone https://github.com/BryanChasko/heraldstack-mcp.git /tmp/heraldstack-mcp
36+
cargo build --release --manifest-path /tmp/heraldstack-mcp/tools/readme-lint/Cargo.toml
37+
- uses: tj-actions/changed-files@v44
38+
id: changed
39+
with:
40+
files: '**/*.md'
41+
- if: steps.changed.outputs.any_changed == 'true'
42+
run: /tmp/heraldstack-mcp/tools/readme-lint/target/release/readme-lint ${{ steps.changed.outputs.all_changed_files }}

0 commit comments

Comments
 (0)