fix(ci): skip Playwright apt deps on Blacksmith runners

Generated-By: looper 0.11.8 (runner=fixer, agent=codex)
This commit is contained in:
Amy
2026-08-12 15:19:53 +08:00
parent fa39129481
commit 201f3f3ee3
2 changed files with 18 additions and 2 deletions
+15 -1
View File
@@ -102,4 +102,18 @@ runs:
- name: Install Playwright browsers
if: ${{ steps.preinstalled-playwright.outputs.enabled != 'true' }}
shell: bash
run: ${{ inputs.install-command }}
env:
INSTALL_COMMAND: ${{ inputs.install-command }}
PACKAGE_JSON_PATH: ${{ inputs.package-json-path }}
RUNNER_LABELS_JSON: ${{ inputs.runner-labels }}
run: |
case "$RUNNER_LABELS_JSON" in
*"blacksmith-"*"ubuntu-2404"*)
package_dir="${PACKAGE_JSON_PATH%/*}"
echo "Using Blacksmith Ubuntu runner OS dependencies; installing Playwright browser binaries only."
pnpm -C "$package_dir" exec playwright install chromium
;;
*)
bash -o pipefail -c "$INSTALL_COMMAND"
;;
esac
+3 -1
View File
@@ -21,11 +21,13 @@ describe("GitHub Actions cache workflows", () => {
const action = await readFile(setupPlaywrightAction, "utf8");
expect(action).toContain("*'\"nexu-runners-'*");
expect(action).toContain('*"blacksmith-"*"ubuntu-2404"*)');
expect(action).toContain("PLAYWRIGHT_BROWSERS_PATH");
expect(action).toContain("steps.preinstalled-playwright.outputs.enabled == 'true'");
expect(action).toContain("steps.preinstalled-playwright.outputs.enabled != 'true'");
expect(action).toContain('pnpm -C "$package_dir" exec playwright install chromium');
expect(action).toContain("run: ${{ inputs.install-command }}");
expect(action).toContain("Using Blacksmith Ubuntu runner OS dependencies");
expect(action).toContain('bash -o pipefail -c "$INSTALL_COMMAND"');
});
it("[P1] keeps pnpm cache writes on explicit trusted main seed jobs", async () => {