Skip to content

Commit 3ce607a

Browse files
Merge pull request #25 from QuarticCat/ci
Add Cargo.lock check and doc check to ch11
2 parents 88c12d4 + 3b68b5c commit 3ce607a

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

engineering-book/src/ch11-putting-it-all-together-a-production-cic.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747

4848
- uses: Swatinem/rust-cache@v2 # Cache dependencies
4949

50+
- name: Check Cargo.lock
51+
run: cargo fetch --locked
52+
53+
- name: Check doc
54+
run: RUSTDOCFLAGS='-Dwarnings' cargo doc --workspace --all-features --no-deps
55+
5056
- name: Check compilation
5157
run: cargo check --workspace --all-targets --all-features
5258

@@ -192,7 +198,7 @@ jobs:
192198
│ (2×) │ │ (2×) │ │ │ │ │ │(PR) │
193199
└──────┘ └──────┘ └────────┘ └──────┘ └──────┘
194200
3 min 8 min 8 min 12 min 5 min
195-
201+
196202
Total wall-clock: ~14 min (parallel after check gate)
197203
```
198204
@@ -541,29 +547,29 @@ flowchart LR
541547
subgraph "Stage 1 — Fast Feedback < 2 min"
542548
CHECK["cargo check\ncargo clippy\ncargo fmt"]
543549
end
544-
550+
545551
subgraph "Stage 2 — Tests < 5 min"
546552
TEST["cargo nextest\ncargo test --doc"]
547553
end
548-
554+
549555
subgraph "Stage 3 — Coverage"
550556
COV["cargo llvm-cov\nfail-under 80%"]
551557
end
552-
558+
553559
subgraph "Stage 4 — Security"
554560
SEC["cargo audit\ncargo deny check"]
555561
end
556-
562+
557563
subgraph "Stage 5 — Cross-Build"
558564
CROSS["musl static\naarch64 + x86_64"]
559565
end
560-
566+
561567
subgraph "Stage 6 — Release (tag only)"
562568
REL["cargo dist\nGitHub Release"]
563569
end
564-
570+
565571
CHECK --> TEST --> COV --> SEC --> CROSS --> REL
566-
572+
567573
style CHECK fill:#91e5a3,color:#000
568574
style TEST fill:#91e5a3,color:#000
569575
style COV fill:#e3f2fd,color:#000
@@ -581,4 +587,3 @@ flowchart LR
581587
- `cargo-dist` automates cross-platform release builds — stop writing platform matrix YAML by hand
582588

583589
---
584-

0 commit comments

Comments
 (0)