-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: switch to use yarn v4 fix: github action crashing fix: failing yarn v4 install due to incorrect 3rd party dependency fix: remove Keystone pckg causing yarn v4 failure fix: resolutions fix: failing tests fix: github acitons not working with new yarn v4 fix: update readme Update .github/actions/cache-deps/action.yml Co-authored-by: Usame Algan <5880855+usame-algan@users.noreply.github.com> --------- Co-authored-by: Usame Algan <5880855+usame-algan@users.noreply.github.com>
- Loading branch information
1 parent
1e305f4
commit a2b98b1
Showing
25 changed files
with
26,142 additions
and
20,699 deletions.
There are no files selected for viewing
File renamed without changes.
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
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: "Cache Yarn Dependencies" | ||
description: "Restore or save yarn dependencies" | ||
inputs: | ||
mode: | ||
description: "restore-yarn | save-yarn | restore-nc | safe-nc" | ||
required: true | ||
key: | ||
description: "The cache key to use to safe. Attention! Make sure to use the correct computed cache key depending on the mode" | ||
required: false | ||
|
||
outputs: | ||
cache-hit-yarn: | ||
value: ${{ steps.restore.outputs.cache-hit }} | ||
description: "Whether the cache was hit or not" | ||
computed-cache-key-yarn: | ||
value: ${{ steps.restore.outputs.cache-primary-key }} | ||
description: "The computed cache key for yarn" | ||
cache-hit-nc: | ||
value: ${{ steps.restore-nc.outputs.cache-hit }} | ||
description: "Whether the cache was hit or not" | ||
computed-cache-key-nc: | ||
value: ${{ steps.restore-nc.outputs.cache-primary-key }} | ||
description: "The computed cache key for nextjs/cypress" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Restore Yarn Cache | ||
if: ${{ inputs.mode == 'restore-yarn' }} | ||
id: restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
/home/runner/.cache/Cypress | ||
${{ github.workspace }}/.yarn/install-state.gz | ||
${{ github.workspace }}/src/types | ||
key: ${{ runner.os }}-web-core-modules-${{ hashFiles('**/package.json','**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-web-core-modules- | ||
- name: Set composite outputs yarn | ||
if: ${{ inputs.mode == 'restore-yarn' }} | ||
shell: bash | ||
run: | | ||
echo "cache-hit-yarn=${{ steps.restore.outputs.cache-hit }}" >> $GITHUB_OUTPUT | ||
echo "computed-cache-key-yarn=${{ steps.restore.outputs.cache-primary-key }}" >> $GITHUB_OUTPUT | ||
- name: Save Yarn Cache | ||
if: ${{ inputs.mode == 'save-yarn' }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
/home/runner/.cache/Cypress | ||
${{ github.workspace }}/.yarn/install-state.gz | ||
${{ github.workspace }}/src/types | ||
key: ${{inputs.key}} | ||
|
||
- name: Restore Next.js | ||
if: ${{ inputs.mode == 'restore-nc' }} | ||
id: restore-nc | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next/cache | ||
key: ${{ runner.os }}-nextjs-cypress-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | ||
- name: Set composite outputs nc | ||
if: ${{ inputs.mode == 'restore-nc' }} | ||
shell: bash | ||
run: | | ||
echo "cache-hit-nc=${{ steps.restore-nc.outputs.cache-hit }}" >> $GITHUB_OUTPUT | ||
echo "computed-cache-key-nc=${{ steps.restore-nc.outputs.cache-primary-key }}" >> $GITHUB_OUTPUT | ||
- name: Save Next.js | ||
if: ${{ inputs.mode == 'save-nc' }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next/cache | ||
key: ${{inputs.key}} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: "Enable corepack" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Enable Corepack" | ||
shell: bash | ||
run: corepack enable |
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Yarn' | ||
|
||
description: 'Install the dependencies' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
# We require yarn v4 and installing through corepack is the easiest way to get it | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/corepack | ||
|
||
- name: Restore Yarn Cache & Types | ||
id: restore-yarn-types | ||
uses: ./.github/actions/cache-deps | ||
with: | ||
mode: restore-yarn | ||
|
||
- name: Echo cache hit | ||
shell: bash | ||
run: | | ||
echo "Yarn cache hit: ${{ steps.restore-yarn-types.outputs.cache-hit-yarn }}" | ||
- name: Yarn install & after-install generate types | ||
if: steps.restore-yarn-types.outputs.cache-hit-yarn != 'true' | ||
shell: bash | ||
run: | | ||
yarn install --immutable | ||
yarn after-install | ||
- name: Save Yarn Cache & Types | ||
if: steps.restore-yarn-types.outputs.cache-hit-yarn != 'true' | ||
uses: ./.github/actions/cache-deps | ||
with: | ||
mode: save-yarn | ||
key: ${{ steps.restore-yarn-types.outputs.computed-cache-key-yarn }} |
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
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
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
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -56,3 +56,6 @@ yalc.lock | |
/public/*.js.LICENSE.txt | ||
certificates | ||
*storybook.log | ||
|
||
# Yarn v4 | ||
.yarn/* |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: true | ||
|
||
nodeLinker: node-modules |
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
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
Oops, something went wrong.