Skip to content

Commit

Permalink
ci: improve e2e cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
Djiit committed Apr 8, 2024
1 parent f27493f commit becea55
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ jobs:
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- run: |
CACHE_KEYS=$(cat package.json | jq '.devDependencies."@playwright/test" | sub("\\^(?<x>[0-9].[0-9]*.[0-9]+)"; "\(.x)")'
- id: cache
run: |
CACHE_KEYS=$(cat package.json | jq -r '.devDependencies."@playwright/test" | sub("\\^(?<x>[0-9].[0-9]*.[0-9]+)"; "\(.x)")')
echo "cache-key=$CACHE_KEYS" >> $GITHUB_OUTPUT'
- uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-
key: ${{ runner.os }}-playwright-${{ steps.cache.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install dependencies
Expand Down

0 comments on commit becea55

Please sign in to comment.