Skip to content

Commit 80e64cf

Browse files
chore: enable Yarn 4 on CI (#1525)
* chore: enable Yarn 4 on CI (attempt 1) * chore: attempt 2 * chore: attempt 3 * chore: attempt 4 * chore: attempt 5 * chore: fix website * chore: fix attempt 6'
1 parent 817d4ed commit 80e64cf

File tree

8 files changed

+1805
-7
lines changed

8 files changed

+1805
-7
lines changed

.github/actions/setup-deps/action.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@ runs:
77
- name: Setup Node.js
88
uses: actions/setup-node@v3
99
with:
10-
node-version: 18
10+
node-version-file: .nvmrc
1111

1212
- name: Cache deps
1313
id: yarn-cache
1414
uses: actions/cache@v3
1515
with:
16-
path: ./node_modules
17-
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
16+
path: |
17+
./node_modules
18+
.yarn/install-state.gz
19+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
20+
restore-keys: |
21+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
22+
${{ runner.os }}-yarn-
1823
1924
- name: Install deps
2025
if: steps.yarn-cache.outputs.cache-hit != 'true'

.github/actions/setup-website-deps/action.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ runs:
77
- name: Setup Node.js
88
uses: actions/setup-node@v3
99
with:
10-
node-version: 18
10+
node-version-file: .nvmrc
1111

1212
- name: Cache website deps
1313
id: yarn-cache-website
1414
uses: actions/cache@v3
1515
with:
16-
path: ./website/node_modules
17-
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}-website
16+
path: |
17+
./website/node_modules
18+
./website/yarn/install-state.gz
19+
key: website-${{ runner.os }}-yarn-${{ hashFiles('./website/yarn.lock') }}
1820

1921
- name: Install website deps
2022
if: steps.yarn-cache-website.outputs.cache-hit != 'true'

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ build
1919
# Ignore lock files in examples for now
2020
examples/**/yarn.lock
2121
.docusaurus
22-

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

.yarn/releases/yarn-4.0.1.cjs

+893
Large diffs are not rendered by default.

.yarnrc.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
enableGlobalCache: true
2+
13
nodeLinker: node-modules
4+
5+
yarnPath: .yarn/releases/yarn-4.0.1.cjs

website/.yarn/releases/yarn-4.0.1.cjs

+893
Large diffs are not rendered by default.

website/.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarnPath: .yarn/releases/yarn-4.0.1.cjs

0 commit comments

Comments
 (0)