Do the Trunk build check as an end-to-end test

This consolidates our whole CI workflow into `cargo test`.
This commit is contained in:
Aaron Fenyes 2025-03-28 12:30:02 -07:00
parent 0a9d234557
commit 992fb76419
3 changed files with 21 additions and 14 deletions

View file

@ -5,6 +5,9 @@ mod engine;
mod outline;
mod specified;
#[cfg(test)]
mod tests;
use rustc_hash::FxHashSet;
use sycamore::prelude::*;

14
app-proto/src/tests.rs Normal file
View file

@ -0,0 +1,14 @@
use std::process::Command;
// build and bundle the application, reporting success if there are no errors or
// warnings. to see this test fail while others succeed, try moving `index.html`
// or one of the assets that it links to
#[test]
fn trunk_build_test() {
let build_status = Command::new("trunk")
.arg("build")
.env("RUSTFLAGS", "-D warnings")
.status()
.expect("Call to Trunk failed");
assert!(build_status.success());
}