mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:10:49 +00:00
test: add docker e2e rerun helpers
This commit is contained in:
27
scripts/check-workflows.mjs
Normal file
27
scripts/check-workflows.mjs
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env node
|
||||
// Runs local workflow sanity checks.
|
||||
// Uses an installed actionlint when present, otherwise falls back to `go run`
|
||||
// for the pinned version used by CI, then runs repo-specific composite guards.
|
||||
import { spawnSync } from "node:child_process";
|
||||
|
||||
const ACTIONLINT_VERSION = "1.7.11";
|
||||
|
||||
function commandExists(command) {
|
||||
return spawnSync("bash", ["-lc", `command -v ${command}`], { stdio: "ignore" }).status === 0;
|
||||
}
|
||||
|
||||
function run(command, args) {
|
||||
const result = spawnSync(command, args, { stdio: "inherit" });
|
||||
if (result.status !== 0) {
|
||||
process.exit(result.status ?? 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (commandExists("actionlint")) {
|
||||
run("actionlint", []);
|
||||
} else {
|
||||
run("go", ["run", `github.com/rhysd/actionlint/cmd/actionlint@v${ACTIONLINT_VERSION}`]);
|
||||
}
|
||||
|
||||
run("python3", ["scripts/check-composite-action-input-interpolation.py"]);
|
||||
run("node", ["scripts/check-no-conflict-markers.mjs"]);
|
||||
Reference in New Issue
Block a user