Skip to content

Commit 2d8f6f9

Browse files
committed
Add bevy_reflect_compile_fail_tests to CI
1 parent 3f08b08 commit 2d8f6f9

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
~/.cargo/git/db/
109109
target/
110110
crates/bevy_ecs_compile_fail_tests/target/
111+
crates/bevy_reflect/bevy_reflect_compile_fail_tests/target/
111112
key: ${{ runner.os }}-cargo-check-compiles-${{ hashFiles('**/Cargo.toml') }}
112113
- uses: dtolnay/rust-toolchain@stable
113114
with:

tools/ci/src/main.rs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,24 @@ fn main() {
8888
}
8989

9090
if what_to_run.contains(Check::COMPILE_FAIL) {
91-
// Run UI tests (they do not get executed with the workspace tests)
92-
// - See crates/bevy_ecs_compile_fail_tests/README.md
93-
let _subdir = sh.push_dir("crates/bevy_ecs_compile_fail_tests");
94-
cmd!(sh, "cargo test --target-dir ../../target")
95-
.run()
96-
.expect("Compiler errors of the ECS compile fail tests seem to be different than expected! Check locally and compare rust versions.");
91+
{
92+
// ECS Compile Fail Tests
93+
// Run UI tests (they do not get executed with the workspace tests)
94+
// - See crates/bevy_ecs_compile_fail_tests/README.md
95+
let _dir_raii = sh.push_dir("crates/bevy_ecs_compile_fail_tests");
96+
cmd!(sh, "cargo test --target-dir ../../target")
97+
.run()
98+
.expect("Compiler errors of the ECS compile fail tests seem to be different than expected! Check locally and compare rust versions.");
99+
}
100+
{
101+
// Reflect Compile Fail Tests
102+
// Run tests (they do not get executed with the workspace tests)
103+
// - See crates/bevy_ecs_compile_fail_tests/README.md
104+
let _dir_raii = sh.push_dir("crates/bevy_reflect/bevy_reflect_compile_fail_tests");
105+
cmd!(sh, "cargo test --target-dir ../../../target")
106+
.run()
107+
.expect("Compiler errors of the Reflect compile fail tests seem to be different than expected! Check locally and compare rust versions.");
108+
}
97109
}
98110

99111
if what_to_run.contains(Check::TEST) {

0 commit comments

Comments
 (0)