-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,29 +14,53 @@ jobs: | |
# This job installs dependencies once and caches them. | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
yarn-cache-key: ${{ steps.restore-yarn.outputs.cache-primary-key }} | ||
nc-cache-key: ${{ steps.restore-nc.outputs.cache-primary-key }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable Corepack | ||
shell: bash | ||
run: corepack enable | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node & yarn | ||
uses: actions/setup-node@v4 | ||
- name: Restore Yarn Cache | ||
id: restore-yarn | ||
uses: actions/cache/restore@v4 | ||
with: | ||
node-version: '22.11.0' # jod | ||
cache: 'yarn' | ||
|
||
- name: Cache Yarn dependencies | ||
uses: ./.github/actions/cache-deps | ||
path: | | ||
**/node_modules | ||
${{ github.workspace }}/.yarn/install-state.gz | ||
key: ${{ runner.os }}-web-core-modules-${{ hashFiles('**/package.json', '**/yarn.lock') }} | ||
|
||
- name: Restore Nextjs/Cypress Cache | ||
id: restore-nc | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next/cache | ||
/home/runner/.cache/Cypress | ||
key: ${{ runner.os }}-nextjs-cypress-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-cypress- | ||
- name: Yarn install | ||
shell: bash | ||
run: yarn install --immutable | ||
- name: Yarn after install | ||
shell: bash | ||
run: yarn after-install | ||
if: steps.restore-yarn.outputs.cache-hit != 'true' | ||
run: yarn install --immutable | ||
|
||
- run: yarn after-install | ||
|
||
- name: Save Yarn Cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
${{ github.workspace }}/.yarn/install-state.gz | ||
key: ${{ steps.restore-yarn.outputs.cache-primary-key }} | ||
|
||
- name: Save Nextjs/Cypress Cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next/cache | ||
/home/runner/.cache/Cypress | ||
key: ${{ steps.restore-nc.outputs.cache-primary-key }} | ||
|
||
eslint: | ||
needs: build | ||
|
@@ -49,8 +73,21 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache Yarn dependencies | ||
uses: ./.github/actions/cache-deps | ||
- name: Restore Yarn Cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
${{ github.workspace }}/.yarn/install-state.gz | ||
key: ${{ needs.build.outputs.yarn-cache-key }} | ||
|
||
- name: Restore Nextjs/Cypress Cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next/cache | ||
/home/runner/.cache/Cypress | ||
key: ${{ needs.build.outputs.nc-cache-key }} | ||
|
||
- uses: CatChen/[email protected] | ||
with: | ||
|
@@ -76,8 +113,21 @@ jobs: | |
shell: bash | ||
run: corepack enable | ||
|
||
- name: Cache Yarn dependencies | ||
uses: ./.github/actions/cache-deps | ||
- name: Restore Yarn Cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
${{ github.workspace }}/.yarn/install-state.gz | ||
key: ${{ needs.build.outputs.yarn-cache-key }} | ||
|
||
- name: Restore Nextjs/Cypress Cache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next/cache | ||
/home/runner/.cache/Cypress | ||
key: ${{ needs.build.outputs.nc-cache-key }} | ||
|
||
- name: Annotations and coverage report | ||
uses: ArtiomTr/[email protected] | ||
|