From 90ca3f65b1f8a07e2e637cfe465f39082f864f99 Mon Sep 17 00:00:00 2001 From: Derek Date: Fri, 29 Dec 2023 08:52:07 -0500 Subject: [PATCH] feat: cache --- .github/workflows/ui_tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 14f0497640..5a4330a742 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -34,12 +34,22 @@ jobs: node-version: 18.x cache: 'npm' cache-dependency-path: 'package-lock.json' + - name: Get installed Playwright version + id: playwright-version + run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV + - name: Cache playwright binaries + uses: actions/cache@v3 + id: playwright-cache + with: + path: | + ~/.cache/ms-playwright + key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} - name: install run: npm ci - name: build run: npm run build - name: Install Playwright Browsers - working-directory: ./apps/laboratory/ + if: steps.playwright-cache.outputs.cache-hit != 'true' run: npm run playwright:install - name: Run Playwright tests env: