@@ -2704,6 +2704,7 @@ def generateWebPnpmCache(ctx):
27042704def cacheBrowsers (ctx ):
27052705 e2e_trigger = [
27062706 event ["base" ],
2707+ event ["cron" ],
27072708 {
27082709 "event" : "pull_request" ,
27092710 "path" : {
@@ -2729,8 +2730,10 @@ def cacheBrowsers(ctx):
27292730 }]
27302731
27312732 webPnpmCacheSteps = restoreWebPnpmCache (extra_commands = [
2733+ "cd %s" % dirs ["web" ],
27322734 ". ./.woodpecker.env" ,
27332735 "if $BROWSER_CACHE_FOUND; then exit 0; fi" ,
2736+ "cd %s" % dirs ["base" ],
27342737 ])
27352738
27362739 browser_cache_steps = [
@@ -2741,9 +2744,9 @@ def cacheBrowsers(ctx):
27412744 "PLAYWRIGHT_BROWSERS_PATH" : ".playwright" ,
27422745 },
27432746 "commands" : [
2747+ "cd %s" % dirs ["web" ],
27442748 ". ./.woodpecker.env" ,
27452749 "if $BROWSER_CACHE_FOUND; then exit 0; fi" ,
2746- "cd %s" % dirs ["web" ],
27472750 "pnpm exec playwright install --with-deps" ,
27482751 "pnpm exec playwright install --list" ,
27492752 "tar -czf %s .playwright" % dirs ["playwrightBrowsersArchive" ],
@@ -2754,9 +2757,9 @@ def cacheBrowsers(ctx):
27542757 "image" : MINIO_MC ,
27552758 "environment" : MINIO_MC_ENV ,
27562759 "commands" : [
2760+ "cd %s" % dirs ["web" ],
27572761 ". ./.woodpecker.env" ,
27582762 "if $BROWSER_CACHE_FOUND; then exit 0; fi" ,
2759- "cd %s" % dirs ["web" ],
27602763 "playwright_version=$(bash tests/woodpecker/script.sh get_playwright_version)" ,
27612764 "mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY" ,
27622765 "mc cp -r -a %s s3/$CACHE_BUCKET/web/browsers-cache/$playwright_version/" % dirs ["playwrightBrowsersArchive" ],
0 commit comments