From 43877a356af7e2b49839923a9ea9e501beeebe35 Mon Sep 17 00:00:00 2001 From: Wes Date: Mon, 4 Nov 2024 10:22:06 -0700 Subject: [PATCH] chore: cache playwright's browser binaries (#3319) Cache playwright browser binaries to improve CI test speed Fixes #3286 --- .github/actions/build-cache/action.yml | 9 +++++++++ .github/workflows/writecache.yml | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/.github/actions/build-cache/action.yml b/.github/actions/build-cache/action.yml index 232dd4e07..094dadda1 100644 --- a/.github/actions/build-cache/action.yml +++ b/.github/actions/build-cache/action.yml @@ -56,3 +56,12 @@ runs: key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm- + - name: Restore Playwright Browser Cache + id: cache-playwright + uses: actions/cache/restore@v4 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-playwright- + diff --git a/.github/workflows/writecache.yml b/.github/workflows/writecache.yml index 70961a8fd..ce9ca93a7 100644 --- a/.github/workflows/writecache.yml +++ b/.github/workflows/writecache.yml @@ -66,6 +66,12 @@ jobs: ~/.pnpm-store node_modules key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} + - name: Save Playwright Browser Cache + id: cache-playwright + uses: actions/cache/save@v4 + with: + path: ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ hashFiles('**/pnpm-lock.yaml') }} - name: Save Docker Images uses: ScribeMD/docker-cache@0.5.0 with: