From 90ffcf67043f7810ea586dc25310c0bb76af2bba Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Wed, 25 Jun 2025 14:03:32 +0800 Subject: [PATCH] cache playwright in ci --- .github/actions/setup-playwright/action.yml | 6 ++++++ .github/workflows/tests.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/actions/setup-playwright/action.yml b/.github/actions/setup-playwright/action.yml index dcb08c9e..e0095005 100644 --- a/.github/actions/setup-playwright/action.yml +++ b/.github/actions/setup-playwright/action.yml @@ -1,5 +1,9 @@ name: "Setup Playwright" description: "Setup Playwright with caching, using npm (should already be installed)" +inputs: + working-directory: + description: Specifies the working directory where the command is run. + default: . runs: using: "composite" steps: @@ -7,6 +11,7 @@ runs: id: playwright-version shell: bash run: echo "PLAYWRIGHT_VERSION=$(jq -r '.devDependencies.playwright' package.json)" >> $GITHUB_ENV + working-directory: ${{ inputs.working-directory }} - name: Cache Playwright id: playwright-cache @@ -18,3 +23,4 @@ runs: - name: Install Playwright dependencies shell: bash run: npx playwright install --with-deps --only-shell + working-directory: ${{ inputs.working-directory }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2fbac282..8bb9ca8d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -114,6 +114,8 @@ jobs: - name: Setup Playwright uses: ./.github/actions/setup-playwright + with: + working-directory: next-ui - name: test:unit working-directory: next-ui