Skip to content

Commit

Permalink
chore(github-actions): update cache keys
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogrodzki committed Jun 5, 2024
1 parent 5ef7434 commit 16f4408
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-
${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-
- run: yarn install

build:
Expand All @@ -59,15 +59,15 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- name: Cache build
uses: actions/cache@v3
with:
path: |
lib
key: ${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-${{github.sha}}
key: ${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-
${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-
- run: yarn build

lint:
Expand All @@ -86,7 +86,7 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- run: yarn lint

tests:
Expand All @@ -105,11 +105,11 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- name: Cache build
uses: actions/cache@v3
with:
path: |
lib
key: ${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-${{github.sha}}
key: ${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-${{github.sha}}
- run: yarn test
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-
${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-
- run: yarn install

build:
Expand All @@ -61,15 +61,15 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- name: Cache build
uses: actions/cache@v3
with:
path: |
lib
key: ${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-${{github.sha}}
key: ${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-
${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-
- run: yarn build

semantic-release:
Expand All @@ -93,15 +93,15 @@ jobs:
with:
path: |
node_modules
key: ${{ runner.os }}-node_modules-cache-v1-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
key: ${{ runner.os }}-node_modules-cache-v2-${{ hashFiles('./yarn.lock') }}-${{github.sha}}
- name: Cache build
uses: actions/cache@v3
with:
path: |
lib
key: ${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-${{github.sha}}
key: ${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-${{github.sha}}
restore-keys: |
${{ runner.os }}-build-cache-v1-${{ github.ref_name }}-
${{ runner.os }}-build-cache-v2-${{ github.ref_name }}-
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
Expand Down
4 changes: 4 additions & 0 deletions src/next/cookies.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {NextRequest, NextResponse} from 'next/server';
import {SetAuthCookiesOptions, refreshCredentials} from './cookies';

declare module 'next/server' {
export class NextRequest extends Request {}
}

jest.mock('../auth', () => ({
getFirebaseAuth: () => ({
handleTokenRefresh: () => ({
Expand Down

0 comments on commit 16f4408

Please sign in to comment.