1212permissions :
1313 contents : read
1414
15+
1516jobs :
1617 withoutpluginsLinux :
18+ env :
19+ PNPM_HOME : ~/.pnpm-store
1720 # run on pushes to any branch
1821 # run on PRs from external forks
1922 if : |
@@ -24,33 +27,27 @@ jobs:
2427 strategy :
2528 fail-fast : false
2629 matrix :
27- node : [20, 22, 24 ]
30+ node : [">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0" ]
2831 steps :
2932 -
3033 name : Checkout repository
3134 uses : actions/checkout@v5
32- -
33- uses : actions/setup-node@v4
34- with :
35- node-version : ${{ matrix.node }}
36- - uses : pnpm/action-setup@v4
37- name : Install pnpm
38- with :
39- version : 10
40- run_install : false
41- - name : Get pnpm store directory
42- shell : bash
43- run : |
44- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
4535 - uses : actions/cache@v4
46- name : Setup pnpm cache
36+ name : Setup gnpm cache
37+ if : always()
4738 with :
48- path : ${{ env.STORE_PATH }}
49- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
39+ path : |
40+ ${{ env.PNPM_HOME }}
41+ ~/.local/share/gnpm
42+ /usr/local/bin/gnpm
43+ /usr/local/bin/gnpm-0.0.12
44+ key : ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
5045 restore-keys : |
51- ${{ runner.os }}-pnpm-store-
52- - name : Only install direct dependencies
53- run : pnpm config set auto-install-peers false
46+ ${{ runner.os }}-gnpm-store-
47+ - name : Setup gnpm
48+ uses : SamTV12345/gnpm-setup@main
49+ with :
50+ version : 0.0.12
5451 -
5552 name : Install libreoffice
5653@@ -59,21 +56,23 @@ jobs:
5956 version : 1.0
6057 -
6158 name : Install all dependencies and symlink for ep_etherpad-lite
62- run : bin/installDeps.sh
59+ run : gnpm i --frozen-lockfile --runtimeVersion="${{ matrix.node }}"
6360 - name : Install admin ui
6461 working-directory : admin
65- run : pnpm install
62+ run : gnpm install --runtimeVersion="${{ matrix.node }}"
6663 - name : Build admin ui
6764 working-directory : admin
68- run : pnpm build
65+ run : gnpm build --runtimeVersion="${{ matrix.node }}"
6966 -
7067 name : Run the backend tests
71- run : pnpm test
68+ run : gnpm test --runtimeVersion="${{ matrix.node }}"
7269 - name : Run the new vitest tests
7370 working-directory : src
74- run : pnpm run test:vitest
71+ run : gnpm run test:vitest --runtimeVersion="${{ matrix.node }}"
7572
7673 withpluginsLinux :
74+ env :
75+ PNPM_HOME : ~/.pnpm-store
7776 # run on pushes to any branch
7877 # run on PRs from external forks
7978 if : |
@@ -84,33 +83,27 @@ jobs:
8483 strategy :
8584 fail-fast : false
8685 matrix :
87- node : [20, 22, 24 ]
86+ node : [">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0" ]
8887 steps :
8988 -
9089 name : Checkout repository
9190 uses : actions/checkout@v5
92- -
93- uses : actions/setup-node@v4
94- with :
95- node-version : ${{ matrix.node }}
96- - uses : pnpm/action-setup@v4
97- name : Install pnpm
98- with :
99- version : 10
100- run_install : false
101- - name : Get pnpm store directory
102- shell : bash
103- run : |
104- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
10591 - uses : actions/cache@v4
10692 name : Setup pnpm cache
93+ if : always()
10794 with :
108- path : ${{ env.STORE_PATH }}
109- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
95+ path : |
96+ ${{ env.PNPM_HOME }}
97+ ~/.local/share/gnpm
98+ /usr/local/bin/gnpm
99+ /usr/local/bin/gnpm-0.0.12
100+ key : ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
110101 restore-keys : |
111- ${{ runner.os }}-pnpm-store-
112- - name : Only install direct dependencies
113- run : pnpm config set auto-install-peers false
102+ ${{ runner.os }}-gnpm-store-
103+ - name : Setup gnpm
104+ uses : SamTV12345/gnpm-setup@main
105+ with :
106+ version : 0.0.12
114107 -
115108 name : Install libreoffice
116109@@ -119,17 +112,14 @@ jobs:
119112 version : 1.0
120113 -
121114 name : Install all dependencies and symlink for ep_etherpad-lite
122- run : bin/installDeps.sh
123- - name : Install admin ui
124- working-directory : admin
125- run : pnpm install
115+ run : gnpm install --frozen-lockfile --runtimeVersion="${{ matrix.node }}"
126116 - name : Build admin ui
127117 working-directory : admin
128- run : pnpm build
118+ run : gnpm build --runtimeVersion="${{ matrix.node }}"
129119 -
130120 name : Install Etherpad plugins
131121 run : >
132- pnpm install --workspace-root
122+ gnpm install --workspace-root
133123 ep_align
134124 ep_author_hover
135125 ep_cursortrace
@@ -141,57 +131,53 @@ jobs:
141131 ep_set_title_on_pad
142132 ep_spellcheck
143133 ep_subscript_and_superscript
144- ep_table_of_contents
134+ ep_table_of_contents --runtimeVersion="${{ matrix.node }}"
145135 -
146136 name : Run the backend tests
147- run : pnpm test
137+ run : gnpm test --runtimeVersion="${{ matrix.node }}"
148138 - name : Run the new vitest tests
149139 working-directory : src
150- run : pnpm run test:vitest
140+ run : gnpm run test:vitest --runtimeVersion="${{ matrix.node }}"
151141
152142 withoutpluginsWindows :
143+ env :
144+ PNPM_HOME : ~\\.pnpm-store
153145 # run on pushes to any branch
154146 # run on PRs from external forks
155147 if : |
156148 (github.event_name != 'pull_request')
157149 || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
150+ strategy :
151+ fail-fast : false
152+ matrix :
153+ node : [">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0"]
158154 name : Windows without plugins
159155 runs-on : windows-latest
160156 steps :
161157 -
162158 name : Checkout repository
163159 uses : actions/checkout@v5
164- -
165- uses : actions/setup-node@v4
166- with :
167- node-version : 20
168- - uses : pnpm/action-setup@v4
169- name : Install pnpm
170- with :
171- version : 10
172- run_install : false
173- - name : Get pnpm store directory
174- shell : bash
175- run : |
176- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
177160 - uses : actions/cache@v4
178161 name : Setup pnpm cache
162+ if : always()
179163 with :
180- path : ${{ env.STORE_PATH }}
181- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
164+ path : |
165+ ${{ env.PNPM_HOME }}
166+ C:\gnpm\
167+ C:\Users\runneradmin\AppData\Roaming\gnpm\
168+ key : ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
182169 restore-keys : |
183- ${{ runner.os }}-pnpm-store-
184- - name : Only install direct dependencies
185- run : pnpm config set auto-install-peers false
170+ ${{ runner.os }}-gnpm-store-
171+ - name : Setup gnpm
172+ uses : SamTV12345/gnpm-setup@main
173+ with :
174+ version : 0.0.12
186175 -
187176 name : Install all dependencies and symlink for ep_etherpad-lite
188- run : bin/installOnWindows.bat
189- - name : Install admin ui
190- working-directory : admin
191- run : pnpm install
177+ run : gnpm install --frozen-lockfile --runtimeVersion="${{ matrix.node }}"
192178 - name : Build admin ui
193179 working-directory : admin
194- run : pnpm build
180+ run : gnpm build --runtimeVersion="${{ matrix.node }}"
195181 -
196182 name : Fix up the settings.json
197183 run : |
@@ -200,58 +186,56 @@ jobs:
200186 -
201187 name : Run the backend tests
202188 working-directory : src
203- run : pnpm test
189+ run : gnpm test --runtimeVersion="${{ matrix.node }}"
204190 - name : Run the new vitest tests
205191 working-directory : src
206- run : pnpm run test:vitest
192+ run : gnpm run test:vitest --runtimeVersion="${{ matrix.node }}"
207193
208194 withpluginsWindows :
195+ env :
196+ PNPM_HOME : ~\\.pnpm-store
209197 # run on pushes to any branch
210198 # run on PRs from external forks
211199 if : |
212200 (github.event_name != 'pull_request')
213201 || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
202+ strategy :
203+ fail-fast : false
204+ matrix :
205+ node : [">=20.0.0 <21.0.0", ">=22.0.0 <23.0.0", ">=24.0.0 <25.0.0"]
214206 name : Windows with Plugins
215207 runs-on : windows-latest
216208
217209 steps :
218210 -
219211 name : Checkout repository
220212 uses : actions/checkout@v5
221- -
222- uses : actions/setup-node@v4
223- with :
224- node-version : 22
225- - uses : pnpm/action-setup@v4
226- name : Install pnpm
227- with :
228- version : 10
229- run_install : false
230- - name : Get pnpm store directory
231- shell : bash
232- run : |
233- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
234213 - uses : actions/cache@v4
235214 name : Setup pnpm cache
215+ if : always()
236216 with :
237- path : ${{ env.STORE_PATH }}
238- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
217+ path : |
218+ ${{ env.PNPM_HOME }}
219+ C:\gnpm\
220+ C:\Users\runneradmin\AppData\Roaming\gnpm\
221+ key : ${{ runner.os }}-gnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
239222 restore-keys : |
240- ${{ runner.os }}-pnpm-store-
241- - name : Only install direct dependencies
242- run : pnpm config set auto-install-peers false
243- - name : Install admin ui
244- working-directory : admin
245- run : pnpm install
223+ ${{ runner.os }}-gnpm-store-
224+ - name : Setup gnpm
225+ uses : SamTV12345/gnpm-setup@main
226+ with :
227+ version : 0.0.12
228+ - name : Install dependencies
229+ run : gnpm install --runtimeVersion="${{ matrix.node }}"
246230 - name : Build admin ui
247231 working-directory : admin
248- run : pnpm build
232+ run : gnpm build --runtimeVersion="${{ matrix.node }}"
249233 -
250234 name : Install Etherpad plugins
251235 # The --legacy-peer-deps flag is required to work around a bug in npm
252236 # v7: https://github.com/npm/cli/issues/2199
253237 run : >
254- pnpm install --workspace-root
238+ gnpm install --workspace-root
255239 ep_align
256240 ep_author_hover
257241 ep_cursortrace
@@ -263,7 +247,7 @@ jobs:
263247 ep_set_title_on_pad
264248 ep_spellcheck
265249 ep_subscript_and_superscript
266- ep_table_of_contents
250+ ep_table_of_contents --runtimeVersion="${{ matrix.node }}"
267251 # Etherpad core dependencies must be installed after installing the
268252 # plugin's dependencies, otherwise npm will try to hoist common
269253 # dependencies by removing them from src/node_modules and installing them
@@ -275,7 +259,7 @@ jobs:
275259 # rules.
276260 -
277261 name : Install all dependencies and symlink for ep_etherpad-lite
278- run : bin/installOnWindows.bat
262+ run : gnpm install --frozen-lockfile --runtimeVersion="${{ matrix.node }}"
279263 -
280264 name : Fix up the settings.json
281265 run : |
@@ -284,7 +268,7 @@ jobs:
284268 -
285269 name : Run the backend tests
286270 working-directory : src
287- run : pnpm test
271+ run : gnpm test --runtimeVersion="${{ matrix.node }}"
288272 - name : Run the new vitest tests
289273 working-directory : src
290- run : pnpm run test:vitest
274+ run : gnpm run test:vitest --runtimeVersion="${{ matrix.node }}"
0 commit comments