TEST
parent
0d639fdeb9
commit
b0a7ccaa75
|
@ -26,18 +26,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ env.node_version }}
|
||||
- name: Restore node_modules from cache
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: node-modules-yarn
|
||||
cache-fingerprint: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }}
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-fingerprint }}
|
||||
- uses: ./.github/workflows/yarn-install.yml
|
||||
- run: yarn lint
|
||||
build:
|
||||
name: Production build
|
||||
|
@ -83,7 +72,7 @@ jobs:
|
|||
path: |
|
||||
apps/web/.next
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ github.sha }}
|
||||
restore-keys: |-
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-
|
||||
# Here's the first place where next-bundle-analysis' own script is used
|
||||
|
|
|
@ -62,14 +62,7 @@ jobs:
|
|||
ports:
|
||||
- 5432:5432
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
name: Set nodeJs version
|
||||
with:
|
||||
node-version: ${{ secrets.NODE_VERSION }}
|
||||
|
||||
- uses: ./.github/workflows/yarn-install.yml
|
||||
- name: Cache production build
|
||||
id: prod-build-cache
|
||||
uses: actions/cache@v3
|
||||
|
@ -81,21 +74,10 @@ jobs:
|
|||
path: |
|
||||
apps/web/.next
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ github.sha }}
|
||||
restore-keys: |-
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-
|
||||
|
||||
- name: Restore node_modules from cache
|
||||
# skip build on exact cache hit
|
||||
if: steps.prod-build-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: node-modules-yarn
|
||||
cache-key: ${{ secrets.NODE_VERSION }}-${{ hashFiles('yarn.lock') }}
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-key }}
|
||||
|
||||
- name: Next.js production build
|
||||
if: steps.prod-build-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
|
|
|
@ -62,19 +62,20 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: ./.github/workflows/yarn-install.yml
|
||||
- name: Cache playwright binaries
|
||||
uses: actions/cache@v2
|
||||
id: playwright-cache
|
||||
with:
|
||||
node-version: ${{ env.node_version }}
|
||||
- name: Restore node_modules from cache
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: node-modules-yarn
|
||||
cache-fingerprint: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }}
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.cache-fingerprint }}
|
||||
- run: yarn playwright install
|
||||
path: |
|
||||
~/Library/Caches/ms-playwright
|
||||
~/.cache/ms-playwright
|
||||
${{ github.workspace }}/node_modules/playwright
|
||||
key: cache-playwright-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: cache-playwright-
|
||||
- name: Install playwright deps
|
||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||
run: yarn playwright install
|
||||
- name: Cache production build
|
||||
id: prod-build-cache
|
||||
uses: actions/cache@v3
|
||||
|
@ -86,7 +87,7 @@ jobs:
|
|||
path: |
|
||||
apps/web/.next
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ github.sha }}
|
||||
restore-keys: |-
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-
|
||||
- name: Run tests
|
||||
|
|
Loading…
Reference in New Issue