File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : macro docs
2
+ on :
3
+ pull_request :
4
+ paths :
5
+ - " guide/src/macros/*.md"
6
+
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.ref }}
9
+ cancel-in-progress : true
10
+
11
+ jobs :
12
+ lint-bindings :
13
+ name : Lint bindings
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+ - name : Setup Rust
21
+ uses : dtolnay/rust-toolchain@master
22
+ with :
23
+ components : rustfmt
24
+ toolchain : nightly
25
+ - name : Cache cargo dependencies
26
+ uses : Swatinem/rust-cache@v2
27
+ with :
28
+ prefix-key : ${{ env.RUST_CACHE_PREFIX }}
29
+ - name : Macro docs
30
+ run : tools/update_lib_docs.sh && git diff --exit-code crates/macros/src/lib.rs
Original file line number Diff line number Diff line change @@ -11,3 +11,12 @@ pre-commit:
11
11
- name : bindings
12
12
run : tools/update_bindings.sh && git diff --exit-code docsrs_bindings.rs
13
13
glob : " allowed_bindings.rs"
14
+ fail_text : |
15
+ The `docsrs_bindings.rs` file seems to be out of date.
16
+ Please check the updated bindings in `docsrs_bindings.rs` and commit the changes.
17
+ - name : " macro docs"
18
+ run : tools/update_lib_docs.sh && git diff --exit-code crates/macros/src/lib.rs
19
+ glob : " guide/src/macros/*.md"
20
+ fail_text : |
21
+ The macro crates documentation seems to be out of date.
22
+ Please check the updated documentation in `crates/macros/src/lib.rs` and commit the changes.
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ lefthook install
28
28
- When changing the ` allowed_bindings.rs ` , you need to have ` docker ` and ` buildx ` installed. This is required to
29
29
build the bindings in a consistent environment. See the [ installation guide] ( https://docs.docker.com/engine/install/ )
30
30
for instructions on how to install Docker.
31
+ - When updating the macro guides (` guide/src/macros ` ), you need to have the ` nightly ` toolchain installed. This is required
32
+ to have the proper formatting in the documentation.
31
33
32
34
## Testing
33
35
You can’t perform that action at this time.
0 commit comments