@plone/volto 15.11.0 → 16.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/acceptance.yml +689 -0
- package/.github/workflows/code-analysis.yml +66 -5
- package/.github/workflows/docs.yml +2 -1
- package/.github/workflows/{core.yml → unit.yml} +7 -27
- package/CHANGELOG.md +40 -13
- package/README.md +11 -47
- package/cypress/add-commands.js +2 -0
- package/cypress/support/commands.js +38 -15
- package/cypress/support/index.js +7 -6
- package/cypress/support/reset-fixture.js +38 -37
- package/cypress.json +2 -1
- package/dist/assets.json +1 -1
- package/dist/chunks.json +49 -49
- package/dist/loadable-stats.json +109 -109
- package/dist/public/static/css/{14.28a992d7.chunk.css → 14.d7b2dfe0.chunk.css} +5 -5
- package/dist/public/static/css/client.5d44351e.chunk.css +8 -0
- package/dist/public/static/css/{plone-volto-components-manage-Widgets-DatetimeWidget.b91b7bf1.chunk.css → plone-volto-components-manage-Widgets-DatetimeWidget.9a0f4d0d.chunk.css} +1 -1
- package/dist/public/static/js/14.d7b2dfe0.chunk.js +3 -0
- package/dist/public/static/js/{14.28a992d7.chunk.js.LICENSE.txt → 14.d7b2dfe0.chunk.js.LICENSE.txt} +0 -0
- package/dist/public/static/js/21.a0b6c3e3.chunk.js +2 -0
- package/dist/public/static/js/22.900fd756.chunk.js +2 -0
- package/dist/public/static/js/23.6af29de6.chunk.js +2 -0
- package/dist/public/static/js/24.150c2de0.chunk.js +2 -0
- package/dist/public/static/js/25.d0db20fc.chunk.js +2 -0
- package/dist/public/static/js/26.03061480.chunk.js +2 -0
- package/dist/public/static/js/27.9fa01afd.chunk.js +2 -0
- package/dist/public/static/js/28.11f2785d.chunk.js +2 -0
- package/dist/public/static/js/29.83468c28.chunk.js +2 -0
- package/dist/public/static/js/30.7ce1882f.chunk.js +2 -0
- package/dist/public/static/js/31.145dfcf9.chunk.js +2 -0
- package/dist/public/static/js/32.86ea3e21.chunk.js +2 -0
- package/dist/public/static/js/client.5d44351e.chunk.js +2 -0
- package/dist/public/static/js/{plone-volto-components-manage-Widgets-DatetimeWidget.b91b7bf1.chunk.js → plone-volto-components-manage-Widgets-DatetimeWidget.9a0f4d0d.chunk.js} +2 -2
- package/dist/public/static/js/{plone-volto-components-theme-View-EventView.cd9d3490.chunk.js → plone-volto-components-theme-View-EventView.9992128c.chunk.js} +2 -2
- package/dist/public/static/js/{react-select.43b5407c.chunk.js → react-select.697c74e8.chunk.js} +2 -2
- package/dist/public/static/js/{runtime~client.f90e8aab.js → runtime~client.712b828a.js} +2 -2
- package/dist/server.js +1 -1
- package/locales/ca/LC_MESSAGES/volto.po +22 -1
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +22 -1
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +22 -1
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +22 -1
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +22 -1
- package/locales/eu.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +22 -1
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +22 -1
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +22 -1
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +22 -1
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +22 -1
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +22 -1
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +22 -1
- package/locales/ro.json +1 -1
- package/locales/volto.pot +23 -2
- package/package-why.json +1 -35
- package/package.json +9 -43
- package/src/components/index.js +1 -0
- package/src/components/manage/Blocks/Block/Edit.jsx +8 -5
- package/src/components/manage/Blocks/Block/EditBlockWrapper.jsx +8 -1
- package/src/components/manage/Blocks/Block/StyleWrapper.jsx +22 -0
- package/src/components/manage/Blocks/Block/StylesSchema.jsx +54 -0
- package/src/components/manage/Blocks/Listing/View.jsx +4 -2
- package/src/components/manage/Blocks/Video/View.jsx +2 -1
- package/src/components/manage/Contents/Contents.jsx +60 -38
- package/src/components/manage/Contents/ContentsItem.jsx +35 -21
- package/src/components/manage/Controlpanels/AddonsControlpanel.jsx +70 -70
- package/src/components/manage/Form/BlockDataForm.jsx +9 -2
- package/src/components/manage/Sidebar/AlignBlock.jsx +40 -55
- package/src/components/manage/Widgets/AlignWidget.jsx +3 -5
- package/src/components/manage/Widgets/ColorPicker.jsx +80 -0
- package/src/components/theme/Popup/Popup.jsx +60 -0
- package/src/components/theme/View/DefaultView.jsx +7 -41
- package/src/components/theme/View/RenderBlocks.jsx +11 -9
- package/src/config/Widgets.jsx +2 -0
- package/src/helpers/Blocks/Blocks.js +34 -1
- package/src/helpers/Blocks/Blocks.test.js +56 -0
- package/src/helpers/Extensions/withBlockSchemaEnhancer.js +39 -0
- package/src/helpers/ScrollToTop/ScrollToTop.jsx +9 -4
- package/src/helpers/index.js +2 -0
- package/src/middleware/api.js +6 -1
- package/src/server.jsx +4 -1
- package/src/store.js +8 -0
- package/src/storeProtectLoadUtils.js +164 -0
- package/src/storeProtectLoadUtils.test.js +455 -0
- package/theme/themes/pastanaga/extras/color-picker-widget.less +100 -0
- package/theme/themes/pastanaga/extras/contents.less +5 -2
- package/theme/themes/pastanaga/extras/main.less +1 -0
- package/theme/themes/pastanaga/extras/sidebar.less +3 -1
- package/theme/themes/pastanaga/extras/toolbar.less +25 -24
- package/theme/themes/pastanaga/modules/popup.overrides +63 -0
- package/.github/workflows/coresandbox.yml +0 -75
- package/.github/workflows/generator.yml +0 -88
- package/.github/workflows/guillotina.yml +0 -51
- package/.github/workflows/multilingual.yml +0 -51
- package/.github/workflows/workingCopy.yml +0 -72
- package/dist/public/static/css/client.7a684119.chunk.css +0 -8
- package/dist/public/static/js/14.28a992d7.chunk.js +0 -3
- package/dist/public/static/js/21.01b5f37b.chunk.js +0 -2
- package/dist/public/static/js/22.a94b1e88.chunk.js +0 -2
- package/dist/public/static/js/23.174cb9eb.chunk.js +0 -2
- package/dist/public/static/js/24.59b8b6f3.chunk.js +0 -2
- package/dist/public/static/js/25.dde0dc57.chunk.js +0 -2
- package/dist/public/static/js/26.efdc324c.chunk.js +0 -2
- package/dist/public/static/js/27.4e1e4efe.chunk.js +0 -2
- package/dist/public/static/js/28.f75211b4.chunk.js +0 -2
- package/dist/public/static/js/29.166cae59.chunk.js +0 -2
- package/dist/public/static/js/30.50c41d5c.chunk.js +0 -2
- package/dist/public/static/js/31.451a371f.chunk.js +0 -2
- package/dist/public/static/js/32.36023657.chunk.js +0 -2
- package/dist/public/static/js/client.7a684119.chunk.js +0 -2
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
name: Acceptance Tests
|
|
2
|
+
on: [push]
|
|
3
|
+
jobs:
|
|
4
|
+
core:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
name: Core Basic
|
|
7
|
+
timeout-minutes: 45
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
node-version: [14.x, 16.x]
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v2
|
|
13
|
+
|
|
14
|
+
# node setup
|
|
15
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
16
|
+
uses: actions/setup-node@v1
|
|
17
|
+
with:
|
|
18
|
+
node-version: ${{ matrix.node-version }}
|
|
19
|
+
|
|
20
|
+
# node cache
|
|
21
|
+
- name: Get yarn cache directory path
|
|
22
|
+
id: yarn-cache-dir-path
|
|
23
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
24
|
+
- uses: actions/cache@v1
|
|
25
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
26
|
+
with:
|
|
27
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
28
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
29
|
+
restore-keys: |
|
|
30
|
+
${{ runner.os }}-yarn-
|
|
31
|
+
|
|
32
|
+
## node install
|
|
33
|
+
- run: yarn --frozen-lockfile
|
|
34
|
+
|
|
35
|
+
- name: Cypress acceptance tests
|
|
36
|
+
uses: cypress-io/github-action@v2
|
|
37
|
+
env:
|
|
38
|
+
BABEL_ENV: production
|
|
39
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
40
|
+
CYPRESS_RETRIES: 2
|
|
41
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
42
|
+
# determine the unique run id necessary to re-run the checks
|
|
43
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
with:
|
|
45
|
+
record: true
|
|
46
|
+
parallel: false # Since they run on different node versions, we can't parallel
|
|
47
|
+
browser: chrome
|
|
48
|
+
# headless: true
|
|
49
|
+
group: Core ${{ matrix.node-version }}
|
|
50
|
+
config: integrationFolder=cypress/tests
|
|
51
|
+
spec: cypress/tests/core/basic/**/*.js
|
|
52
|
+
start: |
|
|
53
|
+
make start-test-acceptance-server
|
|
54
|
+
make start-test-acceptance-frontend
|
|
55
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
56
|
+
|
|
57
|
+
# Upload Cypress screenshots
|
|
58
|
+
- uses: actions/upload-artifact@v1
|
|
59
|
+
if: failure()
|
|
60
|
+
with:
|
|
61
|
+
name: cypress-screenshots
|
|
62
|
+
path: cypress/screenshots
|
|
63
|
+
# Upload Cypress videos
|
|
64
|
+
- uses: actions/upload-artifact@v1
|
|
65
|
+
if: failure()
|
|
66
|
+
with:
|
|
67
|
+
name: cypress-videos
|
|
68
|
+
path: cypress/videos
|
|
69
|
+
|
|
70
|
+
coreblocks:
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
name: Core Blocks
|
|
73
|
+
timeout-minutes: 35
|
|
74
|
+
strategy:
|
|
75
|
+
matrix:
|
|
76
|
+
node-version: [14.x, 16.x]
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v2
|
|
79
|
+
|
|
80
|
+
# node setup
|
|
81
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
82
|
+
uses: actions/setup-node@v1
|
|
83
|
+
with:
|
|
84
|
+
node-version: ${{ matrix.node-version }}
|
|
85
|
+
|
|
86
|
+
# node cache
|
|
87
|
+
- name: Get yarn cache directory path
|
|
88
|
+
id: yarn-cache-dir-path
|
|
89
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
90
|
+
- uses: actions/cache@v1
|
|
91
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
92
|
+
with:
|
|
93
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
94
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
95
|
+
restore-keys: |
|
|
96
|
+
${{ runner.os }}-yarn-
|
|
97
|
+
|
|
98
|
+
## node install
|
|
99
|
+
- run: yarn --frozen-lockfile
|
|
100
|
+
|
|
101
|
+
- name: Cypress acceptance tests
|
|
102
|
+
uses: cypress-io/github-action@v2
|
|
103
|
+
env:
|
|
104
|
+
BABEL_ENV: production
|
|
105
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
106
|
+
CYPRESS_RETRIES: 2
|
|
107
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
108
|
+
# determine the unique run id necessary to re-run the checks
|
|
109
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
110
|
+
with:
|
|
111
|
+
record: true
|
|
112
|
+
parallel: false # Since they run on different node versions, we can't parallel
|
|
113
|
+
browser: chrome
|
|
114
|
+
# headless: true
|
|
115
|
+
group: Core Blocks ${{ matrix.node-version }}
|
|
116
|
+
config: integrationFolder=cypress/tests
|
|
117
|
+
spec: cypress/tests/core/blocks/**/*.js
|
|
118
|
+
start: |
|
|
119
|
+
make start-test-acceptance-server
|
|
120
|
+
make start-test-acceptance-frontend
|
|
121
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
122
|
+
|
|
123
|
+
# Upload Cypress screenshots
|
|
124
|
+
- uses: actions/upload-artifact@v1
|
|
125
|
+
if: failure()
|
|
126
|
+
with:
|
|
127
|
+
name: cypress-screenshots
|
|
128
|
+
path: cypress/screenshots
|
|
129
|
+
# Upload Cypress videos
|
|
130
|
+
- uses: actions/upload-artifact@v1
|
|
131
|
+
if: failure()
|
|
132
|
+
with:
|
|
133
|
+
name: cypress-videos
|
|
134
|
+
path: cypress/videos
|
|
135
|
+
|
|
136
|
+
core6:
|
|
137
|
+
runs-on: ubuntu-latest
|
|
138
|
+
name: Core Basic - Plone 6
|
|
139
|
+
strategy:
|
|
140
|
+
matrix:
|
|
141
|
+
node-version: [16.x]
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/checkout@v2
|
|
144
|
+
|
|
145
|
+
# node setup
|
|
146
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
147
|
+
uses: actions/setup-node@v1
|
|
148
|
+
with:
|
|
149
|
+
node-version: ${{ matrix.node-version }}
|
|
150
|
+
|
|
151
|
+
# node cache
|
|
152
|
+
- name: Get yarn cache directory path
|
|
153
|
+
id: yarn-cache-dir-path
|
|
154
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
155
|
+
- uses: actions/cache@v1
|
|
156
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
157
|
+
with:
|
|
158
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
159
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
160
|
+
restore-keys: |
|
|
161
|
+
${{ runner.os }}-yarn-
|
|
162
|
+
|
|
163
|
+
## node install
|
|
164
|
+
- run: yarn --frozen-lockfile
|
|
165
|
+
|
|
166
|
+
- name: Cypress acceptance tests
|
|
167
|
+
uses: cypress-io/github-action@v2
|
|
168
|
+
env:
|
|
169
|
+
BABEL_ENV: production
|
|
170
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
171
|
+
CYPRESS_RETRIES: 2
|
|
172
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
173
|
+
# determine the unique run id necessary to re-run the checks
|
|
174
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
175
|
+
with:
|
|
176
|
+
record: true
|
|
177
|
+
parallel: false # Since they run on different node versions, we can't parallel
|
|
178
|
+
browser: chrome
|
|
179
|
+
# headless: true
|
|
180
|
+
group: Core Basic - Plone 6
|
|
181
|
+
config: integrationFolder=cypress/tests
|
|
182
|
+
spec: cypress/tests/core/basic/**/*.js
|
|
183
|
+
start: |
|
|
184
|
+
make start-test-acceptance-server DOCKER_IMAGE=plone/plone-backend:6.0.0a4
|
|
185
|
+
make start-test-acceptance-frontend
|
|
186
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
187
|
+
|
|
188
|
+
# Upload Cypress screenshots
|
|
189
|
+
- uses: actions/upload-artifact@v1
|
|
190
|
+
if: failure()
|
|
191
|
+
with:
|
|
192
|
+
name: cypress-screenshots
|
|
193
|
+
path: cypress/screenshots
|
|
194
|
+
# Upload Cypress videos
|
|
195
|
+
- uses: actions/upload-artifact@v1
|
|
196
|
+
if: failure()
|
|
197
|
+
with:
|
|
198
|
+
name: cypress-videos
|
|
199
|
+
path: cypress/videos
|
|
200
|
+
|
|
201
|
+
coresandbox:
|
|
202
|
+
runs-on: ubuntu-latest
|
|
203
|
+
name: Coresandbox
|
|
204
|
+
timeout-minutes: 35
|
|
205
|
+
strategy:
|
|
206
|
+
matrix:
|
|
207
|
+
node-version: [16.x]
|
|
208
|
+
python-version: [3.7]
|
|
209
|
+
steps:
|
|
210
|
+
- uses: actions/checkout@v2
|
|
211
|
+
- name: debug
|
|
212
|
+
working-directory: api
|
|
213
|
+
run: ls -al
|
|
214
|
+
|
|
215
|
+
# node setup
|
|
216
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
217
|
+
uses: actions/setup-node@v1
|
|
218
|
+
with:
|
|
219
|
+
node-version: ${{ matrix.node-version }}
|
|
220
|
+
|
|
221
|
+
# node cache
|
|
222
|
+
- name: Get yarn cache directory path
|
|
223
|
+
id: yarn-cache-dir-path
|
|
224
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
225
|
+
- uses: actions/cache@v1
|
|
226
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
227
|
+
with:
|
|
228
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
229
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
230
|
+
restore-keys: |
|
|
231
|
+
${{ runner.os }}-yarn-
|
|
232
|
+
|
|
233
|
+
- run: yarn --frozen-lockfile
|
|
234
|
+
|
|
235
|
+
# python setup (temporary, while p.volto coresandbox changes are in a PR)
|
|
236
|
+
# - name: Set up Python ${{ matrix.python-version }}
|
|
237
|
+
# uses: actions/setup-python@v1
|
|
238
|
+
# with:
|
|
239
|
+
# python-version: ${{ matrix.python-version }}
|
|
240
|
+
|
|
241
|
+
# # python cache
|
|
242
|
+
# - uses: actions/cache@v1
|
|
243
|
+
# with:
|
|
244
|
+
# path: ~/.cache/pip
|
|
245
|
+
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
246
|
+
# restore-keys: |
|
|
247
|
+
# ${{ runner.os }}-pip-
|
|
248
|
+
# # python install
|
|
249
|
+
# - run: pip install virtualenv
|
|
250
|
+
# - name: pip install
|
|
251
|
+
# working-directory: api
|
|
252
|
+
# run: pip install -r requirements.txt
|
|
253
|
+
# - name: buildout
|
|
254
|
+
# working-directory: api
|
|
255
|
+
# run: buildout
|
|
256
|
+
# env:
|
|
257
|
+
# CI: true
|
|
258
|
+
|
|
259
|
+
- name: Cypress Coresandbox Acceptance tests
|
|
260
|
+
uses: cypress-io/github-action@v2
|
|
261
|
+
env:
|
|
262
|
+
BABEL_ENV: production
|
|
263
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
264
|
+
CYPRESS_RETRIES: 2
|
|
265
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
266
|
+
# determine the unique run id necessary to re-run the checks
|
|
267
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
268
|
+
with:
|
|
269
|
+
record: true
|
|
270
|
+
parallel: true
|
|
271
|
+
browser: chrome
|
|
272
|
+
# headless: true
|
|
273
|
+
group: Coresandbox
|
|
274
|
+
config: integrationFolder=cypress/tests
|
|
275
|
+
spec: cypress/tests/coresandbox/**/*.js
|
|
276
|
+
start: |
|
|
277
|
+
make start-test-acceptance-server-coresandbox
|
|
278
|
+
make start-test-acceptance-frontend-coresandbox
|
|
279
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
280
|
+
|
|
281
|
+
# Upload Cypress screenshots
|
|
282
|
+
- uses: actions/upload-artifact@v1
|
|
283
|
+
if: failure()
|
|
284
|
+
with:
|
|
285
|
+
name: cypress-screenshots
|
|
286
|
+
path: cypress/screenshots
|
|
287
|
+
# Upload Cypress videos
|
|
288
|
+
- uses: actions/upload-artifact@v1
|
|
289
|
+
if: failure()
|
|
290
|
+
with:
|
|
291
|
+
name: cypress-videos
|
|
292
|
+
path: cypress/videos
|
|
293
|
+
|
|
294
|
+
guillotina:
|
|
295
|
+
name: Guillotina
|
|
296
|
+
runs-on: ubuntu-latest
|
|
297
|
+
timeout-minutes: 35
|
|
298
|
+
strategy:
|
|
299
|
+
matrix:
|
|
300
|
+
node-version: [16.x]
|
|
301
|
+
steps:
|
|
302
|
+
- uses: actions/checkout@v2
|
|
303
|
+
|
|
304
|
+
# node setup
|
|
305
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
306
|
+
uses: actions/setup-node@v1
|
|
307
|
+
with:
|
|
308
|
+
node-version: ${{ matrix.node-version }}
|
|
309
|
+
|
|
310
|
+
# node cache
|
|
311
|
+
- name: Get yarn cache directory path
|
|
312
|
+
id: yarn-cache-dir-path
|
|
313
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
314
|
+
- uses: actions/cache@v1
|
|
315
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
316
|
+
with:
|
|
317
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
318
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
319
|
+
restore-keys: |
|
|
320
|
+
${{ runner.os }}-yarn-
|
|
321
|
+
|
|
322
|
+
# node install
|
|
323
|
+
- run: yarn --frozen-lockfile
|
|
324
|
+
|
|
325
|
+
- name: Cypress acceptance tests
|
|
326
|
+
uses: cypress-io/github-action@v2
|
|
327
|
+
env:
|
|
328
|
+
BABEL_ENV: production
|
|
329
|
+
CYPRESS_API: guillotina
|
|
330
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
331
|
+
CYPRESS_RETRIES: 2
|
|
332
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
333
|
+
# determine the unique run id necessary to re-run the checks
|
|
334
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
335
|
+
with:
|
|
336
|
+
record: true
|
|
337
|
+
parallel: true
|
|
338
|
+
browser: chrome
|
|
339
|
+
headless: true
|
|
340
|
+
group: Guillotina
|
|
341
|
+
config: integrationFolder=cypress/tests
|
|
342
|
+
spec: cypress/tests/guillotina/**/*.js
|
|
343
|
+
start: |
|
|
344
|
+
make start-test-acceptance-server-guillotina
|
|
345
|
+
make start-test-acceptance-frontend-guillotina
|
|
346
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:8081 http://localhost:3000'
|
|
347
|
+
|
|
348
|
+
# Upload Cypress screenshots
|
|
349
|
+
- uses: actions/upload-artifact@v1
|
|
350
|
+
if: failure()
|
|
351
|
+
with:
|
|
352
|
+
name: cypress-screenshots
|
|
353
|
+
path: cypress/screenshots
|
|
354
|
+
# Upload Cypress videos
|
|
355
|
+
- uses: actions/upload-artifact@v1
|
|
356
|
+
if: failure()
|
|
357
|
+
with:
|
|
358
|
+
name: cypress-videos
|
|
359
|
+
path: cypress/videos
|
|
360
|
+
|
|
361
|
+
multilingual:
|
|
362
|
+
name: Multilingual
|
|
363
|
+
runs-on: ubuntu-latest
|
|
364
|
+
timeout-minutes: 35
|
|
365
|
+
strategy:
|
|
366
|
+
matrix:
|
|
367
|
+
node-version: [16.x]
|
|
368
|
+
steps:
|
|
369
|
+
- uses: actions/checkout@v2
|
|
370
|
+
- name: debug
|
|
371
|
+
working-directory: api
|
|
372
|
+
run: ls -al
|
|
373
|
+
|
|
374
|
+
# node setup
|
|
375
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
376
|
+
uses: actions/setup-node@v1
|
|
377
|
+
with:
|
|
378
|
+
node-version: ${{ matrix.node-version }}
|
|
379
|
+
|
|
380
|
+
# node cache
|
|
381
|
+
- name: Get yarn cache directory path
|
|
382
|
+
id: yarn-cache-dir-path
|
|
383
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
384
|
+
- uses: actions/cache@v1
|
|
385
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
386
|
+
with:
|
|
387
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
388
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
389
|
+
restore-keys: |
|
|
390
|
+
${{ runner.os }}-yarn-
|
|
391
|
+
|
|
392
|
+
# node install
|
|
393
|
+
- run: yarn --frozen-lockfile
|
|
394
|
+
|
|
395
|
+
- name: Cypress acceptance tests
|
|
396
|
+
uses: cypress-io/github-action@v2
|
|
397
|
+
env:
|
|
398
|
+
BABEL_ENV: production
|
|
399
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
400
|
+
CYPRESS_RETRIES: 2
|
|
401
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
402
|
+
# determine the unique run id necessary to re-run the checks
|
|
403
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
404
|
+
with:
|
|
405
|
+
record: true
|
|
406
|
+
parallel: true
|
|
407
|
+
browser: chrome
|
|
408
|
+
headless: true
|
|
409
|
+
group: Multilingual
|
|
410
|
+
config: integrationFolder=cypress/tests
|
|
411
|
+
spec: cypress/tests/multilingual/**/*.js
|
|
412
|
+
start: |
|
|
413
|
+
make start-test-acceptance-server-multilingual
|
|
414
|
+
make start-test-acceptance-frontend-multilingual
|
|
415
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
416
|
+
|
|
417
|
+
# Upload Cypress screenshots
|
|
418
|
+
- uses: actions/upload-artifact@v1
|
|
419
|
+
if: failure()
|
|
420
|
+
with:
|
|
421
|
+
name: cypress-screenshots
|
|
422
|
+
path: cypress/screenshots
|
|
423
|
+
# Upload Cypress videos
|
|
424
|
+
- uses: actions/upload-artifact@v1
|
|
425
|
+
if: failure()
|
|
426
|
+
with:
|
|
427
|
+
name: cypress-videos
|
|
428
|
+
path: cypress/videos
|
|
429
|
+
|
|
430
|
+
workingcopy:
|
|
431
|
+
name: Working Copy
|
|
432
|
+
runs-on: ubuntu-latest
|
|
433
|
+
timeout-minutes: 35
|
|
434
|
+
strategy:
|
|
435
|
+
matrix:
|
|
436
|
+
node-version: [16.x]
|
|
437
|
+
# python-version: [3.7]
|
|
438
|
+
steps:
|
|
439
|
+
- uses: actions/checkout@v2
|
|
440
|
+
|
|
441
|
+
# node setup
|
|
442
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
443
|
+
uses: actions/setup-node@v1
|
|
444
|
+
with:
|
|
445
|
+
node-version: ${{ matrix.node-version }}
|
|
446
|
+
|
|
447
|
+
# node cache
|
|
448
|
+
- name: Get yarn cache directory path
|
|
449
|
+
id: yarn-cache-dir-path
|
|
450
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
451
|
+
- uses: actions/cache@v1
|
|
452
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
453
|
+
with:
|
|
454
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
455
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
456
|
+
restore-keys: |
|
|
457
|
+
${{ runner.os }}-yarn-
|
|
458
|
+
|
|
459
|
+
# node install
|
|
460
|
+
- run: yarn --frozen-lockfile
|
|
461
|
+
|
|
462
|
+
# # python setup (temporary, while p.a.iterate changes are in a PR)
|
|
463
|
+
# - name: Set up Python ${{ matrix.python-version }}
|
|
464
|
+
# uses: actions/setup-python@v1
|
|
465
|
+
# with:
|
|
466
|
+
# python-version: ${{ matrix.python-version }}
|
|
467
|
+
|
|
468
|
+
# # python cache
|
|
469
|
+
# - uses: actions/cache@v1
|
|
470
|
+
# with:
|
|
471
|
+
# path: ~/.cache/pip
|
|
472
|
+
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
473
|
+
# restore-keys: |
|
|
474
|
+
# ${{ runner.os }}-pip-
|
|
475
|
+
# # python install
|
|
476
|
+
# - run: pip install virtualenv
|
|
477
|
+
# - name: pip install
|
|
478
|
+
# working-directory: api
|
|
479
|
+
# run: pip install -r requirements.txt
|
|
480
|
+
# - name: buildout
|
|
481
|
+
# working-directory: api
|
|
482
|
+
# run: buildout
|
|
483
|
+
# env:
|
|
484
|
+
# CI: true
|
|
485
|
+
|
|
486
|
+
- name: Cypress acceptance tests
|
|
487
|
+
uses: cypress-io/github-action@v2
|
|
488
|
+
env:
|
|
489
|
+
BABEL_ENV: production
|
|
490
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
491
|
+
CYPRESS_RETRIES: 2
|
|
492
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
493
|
+
# determine the unique run id necessary to re-run the checks
|
|
494
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
495
|
+
with:
|
|
496
|
+
record: true
|
|
497
|
+
parallel: true
|
|
498
|
+
browser: chrome
|
|
499
|
+
headless: true
|
|
500
|
+
group: Working Copy
|
|
501
|
+
config: integrationFolder=cypress/tests
|
|
502
|
+
spec: cypress/tests/workingCopy/**/*.js
|
|
503
|
+
start: |
|
|
504
|
+
make start-test-acceptance-server-workingcopy
|
|
505
|
+
make start-test-acceptance-frontend-workingcopy
|
|
506
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
# Upload Cypress screenshots
|
|
510
|
+
- uses: actions/upload-artifact@v1
|
|
511
|
+
if: failure()
|
|
512
|
+
with:
|
|
513
|
+
name: cypress-screenshots
|
|
514
|
+
path: cypress/screenshots
|
|
515
|
+
# Upload Cypress videos
|
|
516
|
+
- uses: actions/upload-artifact@v1
|
|
517
|
+
if: always()
|
|
518
|
+
with:
|
|
519
|
+
name: cypress-videos
|
|
520
|
+
path: cypress/videos
|
|
521
|
+
|
|
522
|
+
generator:
|
|
523
|
+
name: Project Generator
|
|
524
|
+
runs-on: ubuntu-latest
|
|
525
|
+
timeout-minutes: 35
|
|
526
|
+
strategy:
|
|
527
|
+
matrix:
|
|
528
|
+
node-version: [16.x]
|
|
529
|
+
env:
|
|
530
|
+
generator-directory: ./packages/generator-volto
|
|
531
|
+
project-directory: ./my-volto-app
|
|
532
|
+
|
|
533
|
+
steps:
|
|
534
|
+
- uses: actions/checkout@v2
|
|
535
|
+
|
|
536
|
+
# node setup
|
|
537
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
538
|
+
uses: actions/setup-node@v1
|
|
539
|
+
with:
|
|
540
|
+
node-version: ${{ matrix.node-version }}
|
|
541
|
+
|
|
542
|
+
# node cache
|
|
543
|
+
- name: Get yarn cache directory path
|
|
544
|
+
id: yarn-cache-dir-path
|
|
545
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
546
|
+
- uses: actions/cache@v1
|
|
547
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
548
|
+
with:
|
|
549
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
550
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
551
|
+
restore-keys: |
|
|
552
|
+
${{ runner.os }}-yarn-
|
|
553
|
+
|
|
554
|
+
# Build main Volto environment
|
|
555
|
+
- name: Build main Volto environment
|
|
556
|
+
run: yarn --frozen-lockfile
|
|
557
|
+
|
|
558
|
+
# Generator own tests
|
|
559
|
+
- name: Generator tests
|
|
560
|
+
run: yarn && yarn test
|
|
561
|
+
working-directory: ${{env.generator-directory}}
|
|
562
|
+
|
|
563
|
+
# install Yeoman and the generator
|
|
564
|
+
- run: npm -g install yo
|
|
565
|
+
working-directory: ${{env.generator-directory}}
|
|
566
|
+
- run: npm -g install ./
|
|
567
|
+
working-directory: ${{env.generator-directory}}
|
|
568
|
+
|
|
569
|
+
# create a project
|
|
570
|
+
- run: yo @plone/volto my-volto-app --description "test volto project" --no-interactive
|
|
571
|
+
|
|
572
|
+
- name: Install yalc
|
|
573
|
+
run: npm -g install yalc
|
|
574
|
+
|
|
575
|
+
- name: Install a yalc'ed version of the current Volto in the project - publish
|
|
576
|
+
run: yalc publish
|
|
577
|
+
- name: Install a yalc'ed version of the current Volto in the project - add
|
|
578
|
+
run: yalc add @plone/volto --no-pure
|
|
579
|
+
working-directory: ${{env.project-directory}}
|
|
580
|
+
- name: Install a yalc'ed version of the current Volto in the project - install
|
|
581
|
+
run: yarn --force
|
|
582
|
+
working-directory: ${{env.project-directory}}
|
|
583
|
+
|
|
584
|
+
- name: Cypress acceptance tests
|
|
585
|
+
uses: cypress-io/github-action@v2
|
|
586
|
+
env:
|
|
587
|
+
BABEL_ENV: production
|
|
588
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
589
|
+
CYPRESS_RETRIES: 2
|
|
590
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
591
|
+
# determine the unique run id necessary to re-run the checks
|
|
592
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
593
|
+
with:
|
|
594
|
+
record: true
|
|
595
|
+
parallel: true
|
|
596
|
+
browser: chrome
|
|
597
|
+
headless: true
|
|
598
|
+
group: Project Generator
|
|
599
|
+
config: integrationFolder=cypress/tests
|
|
600
|
+
spec: cypress/tests/minimal/**/*.js
|
|
601
|
+
start: |
|
|
602
|
+
make start-test-acceptance-server
|
|
603
|
+
make start-test-acceptance-frontend-project
|
|
604
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
605
|
+
|
|
606
|
+
# Upload Cypress screenshots
|
|
607
|
+
- uses: actions/upload-artifact@v1
|
|
608
|
+
if: failure()
|
|
609
|
+
with:
|
|
610
|
+
name: cypress-screenshots
|
|
611
|
+
path: cypress/screenshots
|
|
612
|
+
|
|
613
|
+
# Upload Cypress videos
|
|
614
|
+
- uses: actions/upload-artifact@v1
|
|
615
|
+
if: failure()
|
|
616
|
+
with:
|
|
617
|
+
name: cypress-videos
|
|
618
|
+
path: cypress/videos
|
|
619
|
+
|
|
620
|
+
- name: Test if npm packs correctly
|
|
621
|
+
run: npm pack --dry-run
|
|
622
|
+
if: success()
|
|
623
|
+
working-directory: ${{env.generator-directory}}
|
|
624
|
+
|
|
625
|
+
seamless:
|
|
626
|
+
name: Seamless Mode
|
|
627
|
+
runs-on: ubuntu-latest
|
|
628
|
+
timeout-minutes: 35
|
|
629
|
+
strategy:
|
|
630
|
+
matrix:
|
|
631
|
+
node-version: [16.x]
|
|
632
|
+
steps:
|
|
633
|
+
- uses: actions/checkout@v2
|
|
634
|
+
|
|
635
|
+
# node setup
|
|
636
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
637
|
+
uses: actions/setup-node@v1
|
|
638
|
+
with:
|
|
639
|
+
node-version: ${{ matrix.node-version }}
|
|
640
|
+
|
|
641
|
+
# node cache
|
|
642
|
+
- name: Get yarn cache directory path
|
|
643
|
+
id: yarn-cache-dir-path
|
|
644
|
+
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
645
|
+
- uses: actions/cache@v1
|
|
646
|
+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
647
|
+
with:
|
|
648
|
+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
649
|
+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
650
|
+
restore-keys: |
|
|
651
|
+
${{ runner.os }}-yarn-
|
|
652
|
+
|
|
653
|
+
# node install
|
|
654
|
+
- run: yarn --frozen-lockfile
|
|
655
|
+
|
|
656
|
+
- name: Cypress acceptance tests
|
|
657
|
+
uses: cypress-io/github-action@v2
|
|
658
|
+
env:
|
|
659
|
+
BABEL_ENV: production
|
|
660
|
+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
661
|
+
CYPRESS_RETRIES: 2
|
|
662
|
+
# Recommended: pass the GitHub token lets this action correctly
|
|
663
|
+
# determine the unique run id necessary to re-run the checks
|
|
664
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
665
|
+
with:
|
|
666
|
+
record: true
|
|
667
|
+
parallel: true
|
|
668
|
+
browser: chrome
|
|
669
|
+
headless: true
|
|
670
|
+
group: Seamless
|
|
671
|
+
config: integrationFolder=cypress/tests
|
|
672
|
+
spec: cypress/tests/minimal/**/*.js
|
|
673
|
+
start: |
|
|
674
|
+
make start-test-acceptance-server
|
|
675
|
+
make start-test-acceptance-frontend-seamless
|
|
676
|
+
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000'
|
|
677
|
+
|
|
678
|
+
# Upload Cypress screenshots
|
|
679
|
+
- uses: actions/upload-artifact@v1
|
|
680
|
+
if: failure()
|
|
681
|
+
with:
|
|
682
|
+
name: cypress-screenshots
|
|
683
|
+
path: cypress/screenshots
|
|
684
|
+
# Upload Cypress videos
|
|
685
|
+
- uses: actions/upload-artifact@v1
|
|
686
|
+
if: failure()
|
|
687
|
+
with:
|
|
688
|
+
name: cypress-videos
|
|
689
|
+
path: cypress/videos
|