@@ -8,174 +8,193 @@ jobs:
88 # run on pushes to any branch
99 # run on PRs from external forks
1010 if : |
11- (github.event_name != 'pull_request')
12- || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
11+ (github.event_name != 'pull_request')
12+ || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
1313 name : Linux without plugins
1414 runs-on : ubuntu-latest
15-
1615 strategy :
1716 fail-fast : false
1817 matrix :
1918 node : [12, 14, 16]
20-
2119 steps :
22- - name : Checkout repository
23- uses : actions/checkout@v2
24-
25- - uses : actions/setup-node@v2
26- with :
27- node-version : ${{ matrix.node }}
28-
29- - name : Install libreoffice
30- run : |
31- sudo add-apt-repository -y ppa:libreoffice/ppa
32- sudo apt update
33- sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
34-
35- - name : Install all dependencies and symlink for ep_etherpad-lite
36- run : src/bin/installDeps.sh
37-
38- - name : Run the backend tests
39- run : cd src && npm test
20+ -
21+ name : Checkout repository
22+ uses : actions/checkout@v2
23+ -
24+ uses : actions/setup-node@v3
25+ with :
26+ node-version : ${{ matrix.node }}
27+ cache : ' npm'
28+ cache-dependency-path : |
29+ src/package-lock.json
30+ src/bin/doc/package-lock.json
31+ -
32+ name : Install libreoffice
33+ run : |
34+ sudo add-apt-repository -y ppa:libreoffice/ppa
35+ sudo apt update
36+ sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
37+ -
38+ name : Install all dependencies and symlink for ep_etherpad-lite
39+ run : src/bin/installDeps.sh
40+ -
41+ name : Run the backend tests
42+ run : cd src && npm test
4043
4144 withpluginsLinux :
4245 # run on pushes to any branch
4346 # run on PRs from external forks
4447 if : |
45- (github.event_name != 'pull_request')
46- || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
48+ (github.event_name != 'pull_request')
49+ || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
4750 name : Linux with Plugins
4851 runs-on : ubuntu-latest
49-
5052 strategy :
5153 fail-fast : false
5254 matrix :
5355 node : [12, 14, 16]
54-
5556 steps :
56- - name : Checkout repository
57- uses : actions/checkout@v2
58-
59- - uses : actions/setup-node@v2
60- with :
61- node-version : ${{ matrix.node }}
62-
63- - name : Install libreoffice
64- run : |
65- sudo add-apt-repository -y ppa:libreoffice/ppa
66- sudo apt update
67- sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
68-
69- - name : Install Etherpad plugins
70- # The --legacy-peer-deps flag is required to work around a bug in npm v7:
71- # https://github.com/npm/cli/issues/2199
72- run : >
73- npm install --no-save --legacy-peer-deps
74- ep_align
75- ep_author_hover
76- ep_cursortrace
77- ep_font_size
78- ep_hash_auth
79- ep_headings2
80- ep_image_upload
81- ep_markdown
82- ep_readonly_guest
83- ep_set_title_on_pad
84- ep_spellcheck
85- ep_subscript_and_superscript
86- ep_table_of_contents
87-
88- # This must be run after installing the plugins, otherwise npm will try to
89- # hoist common dependencies by removing them from src/node_modules and
90- # installing them in the top-level node_modules. As of v6.14.10, npm's hoist
91- # logic appears to be buggy, because it sometimes removes dependencies from
92- # src/node_modules but fails to add them to the top-level node_modules. Even
93- # if npm correctly hoists the dependencies, the hoisting seems to confuse
94- # tools such as `npm outdated`, `npm update`, and some ESLint rules.
95- - name : Install all dependencies and symlink for ep_etherpad-lite
96- run : src/bin/installDeps.sh
97-
98- - name : Run the backend tests
99- run : cd src && npm test
57+ -
58+ name : Checkout repository
59+ uses : actions/checkout@v2
60+ -
61+ uses : actions/setup-node@v3
62+ with :
63+ node-version : ${{ matrix.node }}
64+ cache : ' npm'
65+ cache-dependency-path : |
66+ src/package-lock.json
67+ src/bin/doc/package-lock.json
68+ -
69+ name : Install libreoffice
70+ run : |
71+ sudo add-apt-repository -y ppa:libreoffice/ppa
72+ sudo apt update
73+ sudo apt install -y --no-install-recommends libreoffice libreoffice-pdfimport
74+ -
75+ name : Install Etherpad plugins
76+ # The --legacy-peer-deps flag is required to work around a bug in npm v7:
77+ # https://github.com/npm/cli/issues/2199
78+ run : >
79+ npm install --no-save --legacy-peer-deps
80+ ep_align
81+ ep_author_hover
82+ ep_cursortrace
83+ ep_font_size
84+ ep_hash_auth
85+ ep_headings2
86+ ep_image_upload
87+ ep_markdown
88+ ep_readonly_guest
89+ ep_set_title_on_pad
90+ ep_spellcheck
91+ ep_subscript_and_superscript
92+ ep_table_of_contents
93+ # Etherpad core dependencies must be installed after installing the
94+ # plugin's dependencies, otherwise npm will try to hoist common
95+ # dependencies by removing them from src/node_modules and installing them
96+ # in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
97+ # to be buggy, because it sometimes removes dependencies from
98+ # src/node_modules but fails to add them to the top-level node_modules.
99+ # Even if npm correctly hoists the dependencies, the hoisting seems to
100+ # confuse tools such as `npm outdated`, `npm update`, and some ESLint
101+ # rules.
102+ -
103+ name : Install all dependencies and symlink for ep_etherpad-lite
104+ run : src/bin/installDeps.sh
105+ -
106+ name : Run the backend tests
107+ run : cd src && npm test
100108
101109 withoutpluginsWindows :
102110 # run on pushes to any branch
103111 # run on PRs from external forks
104112 if : |
105- (github.event_name != 'pull_request')
106- || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
113+ (github.event_name != 'pull_request')
114+ || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
107115 name : Windows without plugins
108116 runs-on : windows-latest
109-
110117 steps :
111- - name : Checkout repository
112- uses : actions/checkout@v2
113-
114- - uses : actions/setup-node@v2
115- with :
116- node-version : 12
117-
118- - name : Install all dependencies and symlink for ep_etherpad-lite
119- run : src/bin/installOnWindows.bat
120-
121- - name : Fix up the settings.json
122- run : |
123- powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
124- powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
125-
126- - name : Run the backend tests
127- run : cd src && npm test
118+ -
119+ name : Checkout repository
120+ uses : actions/checkout@v2
121+ -
122+ uses : actions/setup-node@v3
123+ with :
124+ node-version : 12
125+ cache : ' npm'
126+ cache-dependency-path : |
127+ src/package-lock.json
128+ src/bin/doc/package-lock.json
129+ -
130+ name : Install all dependencies and symlink for ep_etherpad-lite
131+ run : src/bin/installOnWindows.bat
132+ -
133+ name : Fix up the settings.json
134+ run : |
135+ powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
136+ powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
137+ -
138+ name : Run the backend tests
139+ run : cd src && npm test
128140
129141 withpluginsWindows :
130142 # run on pushes to any branch
131143 # run on PRs from external forks
132144 if : |
133- (github.event_name != 'pull_request')
134- || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
145+ (github.event_name != 'pull_request')
146+ || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
135147 name : Windows with Plugins
136148 runs-on : windows-latest
137149
138150 steps :
139- - name : Checkout repository
140- uses : actions/checkout@v2
141-
142- - uses : actions/setup-node@v2
143- with :
144- node-version : 12
145-
146- - name : Install Etherpad plugins
147- # The --legacy-peer-deps flag is required to work around a bug in npm v7:
148- # https://github.com/npm/cli/issues/2199
149- run : >
150- npm install --no-save --legacy-peer-deps
151- ep_align
152- ep_author_hover
153- ep_cursortrace
154- ep_font_size
155- ep_hash_auth
156- ep_headings2
157- ep_image_upload
158- ep_markdown
159- ep_readonly_guest
160- ep_set_title_on_pad
161- ep_spellcheck
162- ep_subscript_and_superscript
163- ep_table_of_contents
164-
165- # This must be run after installing the plugins, otherwise npm will try to
166- # hoist common dependencies by removing them from src/node_modules and
167- # installing them in the top-level node_modules. As of v6.14.10, npm's hoist
168- # logic appears to be buggy, because it sometimes removes dependencies from
169- # src/node_modules but fails to add them to the top-level node_modules. Even
170- # if npm correctly hoists the dependencies, the hoisting seems to confuse
171- # tools such as `npm outdated`, `npm update`, and some ESLint rules.
172- - name : Install all dependencies and symlink for ep_etherpad-lite
173- run : src/bin/installOnWindows.bat
174-
175- - name : Fix up the settings.json
176- run : |
177- powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
178- powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
179-
180- - name : Run the backend tests
181- run : cd src && npm test
151+ -
152+ name : Checkout repository
153+ uses : actions/checkout@v2
154+ -
155+ uses : actions/setup-node@v3
156+ with :
157+ node-version : 12
158+ cache : ' npm'
159+ cache-dependency-path : |
160+ src/package-lock.json
161+ src/bin/doc/package-lock.json
162+ -
163+ name : Install Etherpad plugins
164+ # The --legacy-peer-deps flag is required to work around a bug in npm
165+ # v7: https://github.com/npm/cli/issues/2199
166+ run : >
167+ npm install --no-save --legacy-peer-deps
168+ ep_align
169+ ep_author_hover
170+ ep_cursortrace
171+ ep_font_size
172+ ep_hash_auth
173+ ep_headings2
174+ ep_image_upload
175+ ep_markdown
176+ ep_readonly_guest
177+ ep_set_title_on_pad
178+ ep_spellcheck
179+ ep_subscript_and_superscript
180+ ep_table_of_contents
181+ # Etherpad core dependencies must be installed after installing the
182+ # plugin's dependencies, otherwise npm will try to hoist common
183+ # dependencies by removing them from src/node_modules and installing them
184+ # in the top-level node_modules. As of v6.14.10, npm's hoist logic appears
185+ # to be buggy, because it sometimes removes dependencies from
186+ # src/node_modules but fails to add them to the top-level node_modules.
187+ # Even if npm correctly hoists the dependencies, the hoisting seems to
188+ # confuse tools such as `npm outdated`, `npm update`, and some ESLint
189+ # rules.
190+ -
191+ name : Install all dependencies and symlink for ep_etherpad-lite
192+ run : src/bin/installOnWindows.bat
193+ -
194+ name : Fix up the settings.json
195+ run : |
196+ powershell -Command "(gc settings.json.template) -replace '\"max\": 10', '\"max\": 10000' | Out-File -encoding ASCII settings.json.holder"
197+ powershell -Command "(gc settings.json.holder) -replace '\"points\": 10', '\"points\": 1000' | Out-File -encoding ASCII settings.json"
198+ -
199+ name : Run the backend tests
200+ run : cd src && npm test
0 commit comments