Skip to content

Commit

Permalink
chore(ci): enhance caching strategy in GitHub Actions workflow for No…
Browse files Browse the repository at this point in the history
…de modules and Playwright dependencies
  • Loading branch information
MoinJulian committed Nov 21, 2024
1 parent 6be1cbd commit a73e73f
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,32 @@ jobs:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.json') }}
key: ${{ runner.os }}-node-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-node-modules-${{ env.cache-name }}-
${{ runner.os }}-node-modules-
${{ runner.os }}-
- name: Cache Node Modules
id: realgolfgames-logs-cache-playwright
uses: actions/cache@v4
env:
cache-name: cache-playwright
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-deps-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.json') }}
restore-keys: |
${{ runner.os }}-playwright-deps-${{ env.cache-name }}-
${{ runner.os }}-playwright-deps-
${{ runner.os }}-
- name: Install dependencies
if: steps.realgolfgames-logs-cache-node-modules.outputs.cache-hit != 'true'
run: npm install

- name: Install Playwright dependencies
if: steps.realgolfgames-logs-cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium

- name: Run tests
run: npx playwright test --project="Google Chrome"

0 comments on commit a73e73f

Please sign in to comment.