diff --git a/schutzbot/playwright_tests.sh b/schutzbot/playwright_tests.sh index 5542baf56e..a1481f3e8c 100755 --- a/schutzbot/playwright_tests.sh +++ b/schutzbot/playwright_tests.sh @@ -2,11 +2,17 @@ set -euo pipefail PW_WORKERS=4 -if [ -n "${TMT_TREE:-}" ]; then - # Move to the directory with sources + +if [ -n "${PACKIT_PACKAGE_NAME:-}" ]; then + # Runs in CI (Packit) cd "${TMT_TREE}" npm ci +elif [ -n "${TMT_SOURCE_DIR:-}" ]; then + # Runs in dist-git + cd "${TMT_SOURCE_DIR}/cockpit-image-builder" + npm ci elif [ "${CI:-}" != "true" ]; then + # Local fallback cd ../ npm ci # halve the workers on schutzbot to increase reliability