Skip to content

Commit 0af7118

Browse files
committed
Enable register-docs feature for unit test/clippy
1 parent e86388f commit 0af7118

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.github/workflows/full-ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ on:
1313

1414

1515
env:
16-
GDEXT_FEATURES: ''
16+
# Applies to all 'register-docs' features across crates.
17+
CLIPPY_FEATURES: '--features register-docs'
18+
TEST_FEATURES: ''
1719
RETRY: ${{ github.workspace }}/.github/other/retry.sh
1820

1921
# ASan options: https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
@@ -99,7 +101,7 @@ jobs:
99101
# Note: could use `-- --no-deps` to not lint dependencies, however it doesn't really speed up and also skips deps in workspace.
100102
- name: "Check clippy"
101103
run: |
102-
cargo clippy --all-targets $GDEXT_FEATURES -- \
104+
cargo clippy --all-targets $CLIPPY_FEATURES -- \
103105
-D clippy::suspicious \
104106
-D clippy::style \
105107
-D clippy::complexity \
@@ -161,10 +163,10 @@ jobs:
161163
run: cargo +nightly update -Z minimal-versions
162164

163165
- name: "Compile tests"
164-
run: cargo test $GDEXT_FEATURES --no-run ${{ matrix.rust-extra-args }}
166+
run: cargo test $TEST_FEATURES --no-run ${{ matrix.rust-extra-args }}
165167

166168
- name: "Test"
167-
run: cargo test $GDEXT_FEATURES ${{ matrix.rust-extra-args }}
169+
run: cargo test $TEST_FEATURES ${{ matrix.rust-extra-args }}
168170

169171

170172
miri-test:

.github/workflows/minimal-ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ on:
2121

2222

2323
env:
24-
GDEXT_FEATURES: ''
25-
# GDEXT_FEATURES: '--features crate/feature'
24+
# Applies to all 'register-docs' features across crates.
25+
CLIPPY_FEATURES: '--features register-docs'
26+
TEST_FEATURES: ''
2627
# GDEXT_CRATE_ARGS: '-p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot'
2728
RETRY: ${{ github.workspace }}/.github/other/retry.sh
2829

@@ -96,7 +97,7 @@ jobs:
9697

9798
- name: "Check clippy"
9899
run: |
99-
cargo clippy --all-targets $GDEXT_FEATURES -- \
100+
cargo clippy --all-targets $CLIPPY_FEATURES -- \
100101
-D clippy::suspicious \
101102
-D clippy::style \
102103
-D clippy::complexity \
@@ -120,10 +121,10 @@ jobs:
120121
uses: ./.github/composite/rust
121122

122123
- name: "Compile tests"
123-
run: cargo test $GDEXT_FEATURES --no-run
124+
run: cargo test $TEST_FEATURES --no-run
124125

125126
- name: "Test"
126-
run: cargo test $GDEXT_FEATURES
127+
run: cargo test $TEST_FEATURES
127128

128129

129130
# For complex matrix workflow, see https://stackoverflow.com/a/65434401

godot/tests/docs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
#![cfg(feature = "register-docs")]
21
/*
32
* Copyright (c) godot-rust; Bromeon and contributors.
43
* This Source Code Form is subject to the terms of the Mozilla Public
54
* License, v. 2.0. If a copy of the MPL was not distributed with this
65
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
76
*/
7+
8+
#![cfg(feature = "register-docs")]
9+
810
use godot::prelude::*;
911

1012
/// *documented* ~ **documented** ~ [AABB] < [pr](https://github.com/godot-rust/gdext/pull/748)

0 commit comments

Comments
 (0)