mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
Fix headless Chrome debug UI CI test
This commit is contained in:
parent
879a830b46
commit
81547af5c6
2 changed files with 18 additions and 8 deletions
4
.github/workflows/rust.yml
vendored
4
.github/workflows/rust.yml
vendored
|
|
@ -5,18 +5,22 @@ on:
|
|||
branches: [main]
|
||||
paths:
|
||||
- "lib/crates/**"
|
||||
- "test/**"
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- ".cargo/**"
|
||||
- ".config/**"
|
||||
- "openapi/**"
|
||||
- ".github/workflows/rust.yml"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "lib/crates/**"
|
||||
- "test/**"
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- ".cargo/**"
|
||||
- ".config/**"
|
||||
- "openapi/**"
|
||||
- ".github/workflows/rust.yml"
|
||||
workflow_dispatch:
|
||||
|
|
|
|||
|
|
@ -300,14 +300,20 @@ async fn debug_page_renders_in_headless_chrome() {
|
|||
"/tmp/twin-openai-debug-screenshot-{}.png",
|
||||
std::process::id()
|
||||
);
|
||||
let output = std::process::Command::new(chrome_binary)
|
||||
.args([
|
||||
"--headless",
|
||||
"--disable-gpu",
|
||||
&format!("--screenshot={screenshot_path}"),
|
||||
"--window-size=1280,900",
|
||||
&format!("{}/__debug", server.base_url),
|
||||
])
|
||||
let mut command = std::process::Command::new(chrome_binary);
|
||||
command.args([
|
||||
"--headless",
|
||||
"--disable-gpu",
|
||||
&format!("--screenshot={screenshot_path}"),
|
||||
"--window-size=1280,900",
|
||||
]);
|
||||
if cfg!(target_os = "linux") {
|
||||
// Ubuntu 24.04 GitHub runners block Chrome's default sandbox unless it
|
||||
// is launched with a compatible user namespace or disabled explicitly.
|
||||
command.arg("--no-sandbox");
|
||||
}
|
||||
let output = command
|
||||
.arg(format!("{}/__debug", server.base_url))
|
||||
.output()
|
||||
.expect("Chrome should run");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue