From fd8bd01f33739253a8c51c6adf81cb241199e119 Mon Sep 17 00:00:00 2001 From: chan Date: Mon, 13 Apr 2026 09:40:04 +0900 Subject: [PATCH] fix(ci): enforce playwright deps installation in CI Remove conditional skipping of 'npx playwright install --with-deps' to ensure OS-level dependencies are installed even when browser binaries are cached. --- Makefile | 4 ++-- docker/ory/oathkeeper/rules.active.json | 2 +- scripts/run_adminfront_ci_tests.sh | 13 +------------ 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index f08f8d6a..06329255 100644 --- a/Makefile +++ b/Makefile @@ -116,8 +116,8 @@ ifeq ($(CI),) PLAYWRIGHT_INSTALL_ALL := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_FIREFOX_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_WEBKIT_COMPLETE)" ]; then echo "Playwright browsers already installed"; else npx playwright install; fi' PLAYWRIGHT_INSTALL_CHROMIUM := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ]; then echo "Playwright chromium already installed"; else npx playwright install chromium; fi' else -PLAYWRIGHT_INSTALL_ALL := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_FIREFOX_COMPLETE)" ] && [ -f "$(PLAYWRIGHT_WEBKIT_COMPLETE)" ]; then echo "Playwright browsers already installed"; else npx playwright install --with-deps; fi' -PLAYWRIGHT_INSTALL_CHROMIUM := sh -c 'if [ -f "$(PLAYWRIGHT_CHROMIUM_COMPLETE)" ]; then echo "Playwright chromium already installed"; else npx playwright install --with-deps chromium; fi' +PLAYWRIGHT_INSTALL_ALL := npx playwright install --with-deps +PLAYWRIGHT_INSTALL_CHROMIUM := npx playwright install --with-deps chromium endif .PHONY: code-check code-check-lint code-check-test-jobs code-check-i18n code-check-i18n-values code-check-go-lint code-check-sync-userfront-locales code-check-userfront-install code-check-userfront-lint code-check-front-lint code-check-backend-tests code-check-userfront-tests code-check-adminfront-tests code-check-devfront-tests code-check-userfront-e2e-tests diff --git a/docker/ory/oathkeeper/rules.active.json b/docker/ory/oathkeeper/rules.active.json index 4a0735da..fd6bfb2d 100755 --- a/docker/ory/oathkeeper/rules.active.json +++ b/docker/ory/oathkeeper/rules.active.json @@ -156,4 +156,4 @@ "authorizer": { "handler": "allow" }, "mutators": [{ "handler": "noop" }] } -] \ No newline at end of file +] diff --git a/scripts/run_adminfront_ci_tests.sh b/scripts/run_adminfront_ci_tests.sh index 9deb304c..17a89245 100755 --- a/scripts/run_adminfront_ci_tests.sh +++ b/scripts/run_adminfront_ci_tests.sh @@ -13,11 +13,6 @@ else playwright_install_desc="npx playwright install" fi -playwright_cache_dir="${HOME}/.cache/ms-playwright" -playwright_chromium_complete="${playwright_cache_dir}/chromium-1208/INSTALLATION_COMPLETE" -playwright_firefox_complete="${playwright_cache_dir}/firefox-1509/INSTALLATION_COMPLETE" -playwright_webkit_complete="${playwright_cache_dir}/webkit-2248/INSTALLATION_COMPLETE" - set +e ( cd adminfront @@ -49,13 +44,7 @@ fi set +e ( cd adminfront - if [ -f "$playwright_chromium_complete" ] && \ - [ -f "$playwright_firefox_complete" ] && \ - [ -f "$playwright_webkit_complete" ]; then - echo "Playwright browsers already installed" - else - "${playwright_install_cmd[@]}" - fi + "${playwright_install_cmd[@]}" ) 2>&1 | tee reports/adminfront-provision.log provision_exit_code=${PIPESTATUS[0]} set -e