File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,32 @@ jobs:
115115 run : |
116116 make test-p2p
117117
118+ docs-tests :
119+ runs-on : ubuntu-22.04
120+ steps :
121+ - name : Git checkout
122+ uses : actions/checkout@v4
123+
124+ - name : Setup build dependencies
125+ run : |
126+ sudo apt update
127+ sudo apt install -y protobuf-compiler
128+
129+ - name : Setup Rust
130+ uses : dtolnay/rust-toolchain@stable
131+ with :
132+ components : rustfmt
133+ toolchain : 1.84
134+
135+ - name : Setup Rust Cache
136+ uses : Swatinem/rust-cache@v2
137+ with :
138+ prefix-key : " v0"
139+
140+ - name : Test documentation code examples
141+ run : |
142+ make test-docs
143+
118144 build :
119145 runs-on : ubuntu-22.04
120146 steps :
Original file line number Diff line number Diff line change @@ -227,6 +227,11 @@ test-release: ## Run tests in release mode
227227test-vrf : # # Run VRF tests, requires nightly Rust
228228 @cd vrf && cargo +nightly test --release -- -Z unstable-options --report-time
229229
230+ .PHONY : test-docs
231+ test-docs : # # Run documentation tests to verify code examples compile and run
232+ @echo " Testing documentation code examples..."
233+ cargo test --doc
234+
230235# Docker build targets
231236
232237.PHONY : docker-build-all
You can’t perform that action at this time.
0 commit comments