Skip to content

Commit 0e978ab

Browse files
committed
ci: add rust quality gates
1 parent 42dcdda commit 0e978ab

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
rust:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Rust
16+
uses: dtolnay/rust-toolchain@stable
17+
with:
18+
components: clippy, rustfmt
19+
20+
- name: Format
21+
run: cargo fmt --check
22+
23+
- name: Clippy
24+
run: cargo clippy --all-targets --all-features -- -D warnings
25+
26+
- name: Test
27+
run: cargo test --all-targets
28+
29+
- name: Doctest
30+
run: cargo test --doc

.github/workflows/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
inventory:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Validate course inventory
16+
run: |
17+
set -euo pipefail
18+
19+
test -s README.md
20+
test -s AGENTS.md
21+
test -s ROADMAP.md
22+
test -s docs/SUMMARY.md
23+
test -s examples/README.md
24+
test -s tests/README.md
25+
test -s benches/README.md
26+
test -s diagrams/README.md
27+
test -s assets/README.md
28+
29+
grep -q "Vector" docs/SUMMARY.md
30+
grep -q "Skip List" docs/SUMMARY.md

0 commit comments

Comments
 (0)