@@ -27,22 +27,42 @@ jobs:
2727 uses : actions/setup-node@v4
2828 with :
2929 node-version : ${{ matrix.node }}
30- cache : ' npm'
31- cache-dependency-path : |
32- src/package-lock.json
33- src/bin/doc/package-lock.json
30+ - uses : pnpm/action-setup@v3
31+ name : Install pnpm
32+ with :
33+ version : 8
34+ run_install : false
35+ - name : Get pnpm store directory
36+ shell : bash
37+ run : |
38+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
39+ - uses : actions/cache@v4
40+ name : Setup pnpm cache
41+ with :
42+ path : ${{ env.STORE_PATH }}
43+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+ restore-keys : |
45+ ${{ runner.os }}-pnpm-store-
46+ - name : Only install direct dependencies
47+ run : pnpm config set auto-install-peers false
3448 -
3549 name : Install libreoffice
36- run : |
37- sudo add-apt-repository -y ppa:libreoffice/ppa
38- sudo apt update
39- sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
50+ 51+ with :
52+ packages : libreoffice libreoffice-pdfimport
53+ version : 1.0
4054 -
4155 name : Install all dependencies and symlink for ep_etherpad-lite
42- run : src/bin/installDeps.sh
56+ run : bin/installDeps.sh
57+ - name : Install admin ui
58+ working-directory : admin
59+ run : pnpm install
60+ - name : Build admin ui
61+ working-directory : admin
62+ run : pnpm build
4363 -
4464 name : Run the backend tests
45- run : cd src && npm test
65+ run : pnpm test
4666
4767 withpluginsLinux :
4868 # run on pushes to any branch
@@ -64,22 +84,43 @@ jobs:
6484 uses : actions/setup-node@v4
6585 with :
6686 node-version : ${{ matrix.node }}
67- cache : ' npm'
68- cache-dependency-path : |
69- src/package-lock.json
70- src/bin/doc/package-lock.json
87+ - uses : pnpm/action-setup@v3
88+ name : Install pnpm
89+ with :
90+ version : 8
91+ run_install : false
92+ - name : Get pnpm store directory
93+ shell : bash
94+ run : |
95+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
96+ - uses : actions/cache@v4
97+ name : Setup pnpm cache
98+ with :
99+ path : ${{ env.STORE_PATH }}
100+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
101+ restore-keys : |
102+ ${{ runner.os }}-pnpm-store-
103+ - name : Only install direct dependencies
104+ run : pnpm config set auto-install-peers false
71105 -
72106 name : Install libreoffice
73- run : |
74- sudo add-apt-repository -y ppa:libreoffice/ppa
75- sudo apt update
76- sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
107+ 108+ with :
109+ packages : libreoffice libreoffice-pdfimport
110+ version : 1.0
111+ -
112+ name : Install all dependencies and symlink for ep_etherpad-lite
113+ run : bin/installDeps.sh
114+ - name : Install admin ui
115+ working-directory : admin
116+ run : pnpm install
117+ - name : Build admin ui
118+ working-directory : admin
119+ run : pnpm build
77120 -
78121 name : Install Etherpad plugins
79- # The --legacy-peer-deps flag is required to work around a bug in npm v7:
80- # https://github.com/npm/cli/issues/2199
81122 run : >
82- npm install --no-save --legacy-peer-deps
123+ pnpm install --workspace-root
83124 ep_align
84125 ep_author_hover
85126 ep_cursortrace
@@ -93,21 +134,9 @@ jobs:
93134 ep_spellcheck
94135 ep_subscript_and_superscript
95136 ep_table_of_contents
96- # Etherpad core dependencies must be installed after installing the
97- # plugin's dependencies, otherwise npm will try to hoist common
98- # dependencies by removing them from src/node_modules and installing them
99- # in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
100- # to be buggy, because it sometimes removes dependencies from
101- # src/node_modules but fails to add them to the top-level node_modules.
102- # Even if npm correctly hoists the dependencies, the hoisting seems to
103- # confuse tools such as `npm outdated`, `npm update`, and some ESLint
104- # rules.
105- -
106- name : Install all dependencies and symlink for ep_etherpad-lite
107- run : src/bin/installDeps.sh
108137 -
109138 name : Run the backend tests
110- run : cd src && npm test
139+ run : pnpm test
111140
112141 withoutpluginsWindows :
113142 # run on pushes to any branch
@@ -125,21 +154,41 @@ jobs:
125154 uses : actions/setup-node@v4
126155 with :
127156 node-version : 20
128- cache : ' npm'
129- cache-dependency-path : |
130- src/package-lock.json
131- src/bin/doc/package-lock.json
157+ - uses : pnpm/action-setup@v3
158+ name : Install pnpm
159+ with :
160+ version : 8
161+ run_install : false
162+ - name : Get pnpm store directory
163+ shell : bash
164+ run : |
165+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
166+ - uses : actions/cache@v4
167+ name : Setup pnpm cache
168+ with :
169+ path : ${{ env.STORE_PATH }}
170+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
171+ restore-keys : |
172+ ${{ runner.os }}-pnpm-store-
173+ - name : Only install direct dependencies
174+ run : pnpm config set auto-install-peers false
132175 -
133176 name : Install all dependencies and symlink for ep_etherpad-lite
134- run : src/bin/installOnWindows.bat
177+ run : bin/installOnWindows.bat
178+ - name : Install admin ui
179+ working-directory : admin
180+ run : pnpm install
181+ - name : Build admin ui
182+ working-directory : admin
183+ run : pnpm build
135184 -
136185 name : Fix up the settings.json
137186 run : |
138187 powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
139188 powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
140189 -
141190 name : Run the backend tests
142- run : cd src && npm test
191+ run : cd src && pnpm test
143192
144193 withpluginsWindows :
145194 # run on pushes to any branch
@@ -157,17 +206,37 @@ jobs:
157206 -
158207 uses : actions/setup-node@v4
159208 with :
160- node-version : 20
161- cache : ' npm'
162- cache-dependency-path : |
163- src/package-lock.json
164- src/bin/doc/package-lock.json
209+ node-version : 21
210+ - uses : pnpm/action-setup@v3
211+ name : Install pnpm
212+ with :
213+ version : 8
214+ run_install : false
215+ - name : Get pnpm store directory
216+ shell : bash
217+ run : |
218+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
219+ - uses : actions/cache@v4
220+ name : Setup pnpm cache
221+ with :
222+ path : ${{ env.STORE_PATH }}
223+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
224+ restore-keys : |
225+ ${{ runner.os }}-pnpm-store-
226+ - name : Only install direct dependencies
227+ run : pnpm config set auto-install-peers false
228+ - name : Install admin ui
229+ working-directory : admin
230+ run : pnpm install
231+ - name : Build admin ui
232+ working-directory : admin
233+ run : pnpm build
165234 -
166235 name : Install Etherpad plugins
167236 # The --legacy-peer-deps flag is required to work around a bug in npm
168237 # v7: https://github.com/npm/cli/issues/2199
169238 run : >
170- npm install --no-save --legacy-peer-deps
239+ pnpm install --workspace-root
171240 ep_align
172241 ep_author_hover
173242 ep_cursortrace
@@ -192,12 +261,12 @@ jobs:
192261 # rules.
193262 -
194263 name : Install all dependencies and symlink for ep_etherpad-lite
195- run : src/ bin/installOnWindows.bat
264+ run : bin/installOnWindows.bat
196265 -
197266 name : Fix up the settings.json
198267 run : |
199268 powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
200269 powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
201270 -
202271 name : Run the backend tests
203- run : cd src && npm test
272+ run : cd src && pnpm test
0 commit comments