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:
115
115
run : |
116
116
make test-p2p
117
117
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
+
118
144
build :
119
145
# NOTE: If you add or remove platforms from this matrix, make sure to update
120
146
# the documentation at website/docs/developers/getting-started.mdx
Original file line number Diff line number Diff line change @@ -227,6 +227,11 @@ test-release: ## Run tests in release mode
227
227
test-vrf : # # Run VRF tests, requires nightly Rust
228
228
@cd vrf && cargo +nightly test --release -- -Z unstable-options --report-time
229
229
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
+
230
235
# Docker build targets
231
236
232
237
.PHONY : docker-build-all
You can’t perform that action at this time.
0 commit comments