From ef3f39f2fb8c841b900a62ae451462e8c3645252 Mon Sep 17 00:00:00 2001 From: Xon <635541+Xon@users.noreply.github.com> Date: Thu, 22 Aug 2024 00:04:11 +0800 Subject: [PATCH] Just give-up on binary caching as it causes issues --- .github/workflows/browsers.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/browsers.yml b/.github/workflows/browsers.yml index 2f74c7d8..aceaa551 100644 --- a/.github/workflows/browsers.yml +++ b/.github/workflows/browsers.yml @@ -27,34 +27,10 @@ jobs: run: npm ci --no-audit env: HUSKY_SKIP_INSTALL: true - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - -# https://github.com/microsoft/playwright/issues/7249#issuecomment-2301568516 -# - name: Detect Playwright version (Windows) -# if: runner.os == 'windows' -# run: echo "PLAYWRIGHT_VERSION=$(npm ll -p --depth=0 playwright | grep -o '@.*')" | Out-File -FilePath $env:GITHUB_ENV -Append - - name: Detect Playwright version (Linux and Mac) - if: runner.os != 'windows' - run: echo "PLAYWRIGHT_VERSION=$(npm ll -p --depth=0 playwright | grep -o '@.*')" >> $GITHUB_ENV - - name: Put $HOME in env - if: runner.os == 'windows' - run: echo "HOME=$HOME" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Cache playwright binaries - uses: actions/cache@v4 - id: playwright-cache - with: - # see https://playwright.dev/docs/browsers#managing-browser-binaries - path: ${{ runner.os == 'Windows' && format('{0}{1}', env.HOME, '\AppData\Local\ms-playwright') || runner.os == 'Linux' && '~/.cache/ms-playwright' || '~/Library/Caches/ms-playwright' }} - key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} - restore-keys: | - ${{ runner.os }}-playwright- - name: Install Playwright Browsers run: npx playwright install --with-deps - if: steps.playwright-cache.outputs.cache-hit != 'true' - run: npx playwright install-deps - if: steps.playwright-cache.outputs.cache-hit != 'true' - name: Run Playwright tests run: npx playwright test --project=${{ matrix.browser }} @@ -78,6 +54,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - uses: actions/setup-node@v4 with: node-version: 20