Add CI for render asset leaks
This commit is contained in:
parent
dc2d1ccbdd
commit
db9352b1c2
@ -73,6 +73,7 @@ impl CI {
|
||||
cmds.append(&mut commands::FormatCommand::default().prepare(sh, flags));
|
||||
cmds.append(&mut commands::ClippyCommand::default().prepare(sh, flags));
|
||||
cmds.append(&mut commands::TestCommand::default().prepare(sh, flags));
|
||||
cmds.append(&mut commands::TestRenderAssetsCommand::default().prepare(sh, flags));
|
||||
cmds.append(&mut commands::TestCheckCommand::default().prepare(sh, flags));
|
||||
cmds.append(&mut commands::IntegrationTestCommand::default().prepare(sh, flags));
|
||||
cmds.append(
|
||||
@ -105,6 +106,7 @@ enum Commands {
|
||||
Format(commands::FormatCommand),
|
||||
Clippy(commands::ClippyCommand),
|
||||
Test(commands::TestCommand),
|
||||
TestRenderAssets(commands::TestRenderAssetsCommand),
|
||||
TestCheck(commands::TestCheckCommand),
|
||||
IntegrationTest(commands::IntegrationTestCommand),
|
||||
IntegrationTestCheck(commands::IntegrationTestCheckCommand),
|
||||
@ -127,6 +129,7 @@ impl Prepare for Commands {
|
||||
Commands::Format(subcommand) => subcommand.prepare(sh, flags),
|
||||
Commands::Clippy(subcommand) => subcommand.prepare(sh, flags),
|
||||
Commands::Test(subcommand) => subcommand.prepare(sh, flags),
|
||||
Commands::TestRenderAssets(subcommand) => subcommand.prepare(sh, flags),
|
||||
Commands::TestCheck(subcommand) => subcommand.prepare(sh, flags),
|
||||
Commands::IntegrationTest(subcommand) => subcommand.prepare(sh, flags),
|
||||
Commands::IntegrationTestCheck(subcommand) => subcommand.prepare(sh, flags),
|
||||
|
||||
@ -14,6 +14,7 @@ pub use integration_test_clean::*;
|
||||
pub use lints::*;
|
||||
pub use test::*;
|
||||
pub use test_check::*;
|
||||
pub use test_render_assets::*;
|
||||
|
||||
mod bench_check;
|
||||
mod clippy;
|
||||
@ -31,3 +32,4 @@ mod integration_test_clean;
|
||||
mod lints;
|
||||
mod test;
|
||||
mod test_check;
|
||||
mod test_render_assets;
|
||||
|
||||
22
tools/ci/src/commands/test_render_assets.rs
Normal file
22
tools/ci/src/commands/test_render_assets.rs
Normal file
@ -0,0 +1,22 @@
|
||||
use crate::{Flag, Prepare, PreparedCommand};
|
||||
use argh::FromArgs;
|
||||
use xshell::cmd;
|
||||
|
||||
/// Runs all tests (except for doc tests).
|
||||
#[derive(FromArgs, Default)]
|
||||
#[argh(subcommand, name = "test-render-assets")]
|
||||
pub struct TestRenderAssetsCommand {}
|
||||
|
||||
impl Prepare for TestRenderAssetsCommand {
|
||||
fn prepare<'a>(&self, sh: &'a xshell::Shell, flags: Flag) -> Vec<PreparedCommand<'a>> {
|
||||
let no_fail_fast = flags
|
||||
.contains(Flag::KEEP_GOING)
|
||||
.then_some("--no-fail-fast")
|
||||
.unwrap_or_default();
|
||||
|
||||
vec![PreparedCommand::new::<Self>(
|
||||
cmd!(sh, "cargo test --test render_asset_leaks {no_fail_fast}"),
|
||||
"Please fix failing tests in output above.",
|
||||
)]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user