Skip to content

Commit c030d54

Browse files
author
valentinab25
committed
test: EN locales, pre-commit fix, feature PRs checks Refs #257193
1 parent f2bb8a6 commit c030d54

File tree

5 files changed

+89
-25
lines changed

5 files changed

+89
-25
lines changed

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[ -n "$CI" ] && exit 0
2+
yarn lint-staged

Jenkinsfile

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,17 @@ pipeline {
6262

6363
stage('Tests') {
6464
when {
65-
allOf {
66-
environment name: 'CHANGE_ID', value: ''
67-
anyOf {
68-
not { changelog '.*^Automated release [0-9\\.]+$' }
69-
branch 'master'
65+
anyOf {
66+
allOf {
67+
not { environment name: 'CHANGE_ID', value: '' }
68+
environment name: 'CHANGE_TARGET', value: 'develop'
69+
}
70+
allOf {
71+
environment name: 'CHANGE_ID', value: ''
72+
anyOf {
73+
not { changelog '.*^Automated release [0-9\\.]+$' }
74+
branch 'master'
75+
}
7076
}
7177
}
7278
}
@@ -110,11 +116,17 @@ pipeline {
110116

111117
stage('Integration tests') {
112118
when {
113-
allOf {
114-
environment name: 'CHANGE_ID', value: ''
115-
anyOf {
116-
not { changelog '.*^Automated release [0-9\\.]+$' }
117-
branch 'master'
119+
anyOf {
120+
allOf {
121+
not { environment name: 'CHANGE_ID', value: '' }
122+
environment name: 'CHANGE_TARGET', value: 'develop'
123+
}
124+
allOf {
125+
environment name: 'CHANGE_ID', value: ''
126+
anyOf {
127+
not { changelog '.*^Automated release [0-9\\.]+$' }
128+
branch 'master'
129+
}
118130
}
119131
}
120132
}
@@ -167,13 +179,19 @@ pipeline {
167179

168180
stage('Report to SonarQube') {
169181
when {
170-
allOf {
171-
environment name: 'CHANGE_ID', value: ''
172-
anyOf {
173-
branch 'master'
174-
allOf {
175-
branch 'develop'
176-
not { changelog '.*^Automated release [0-9\\.]+$' }
182+
anyOf {
183+
allOf {
184+
not { environment name: 'CHANGE_ID', value: '' }
185+
environment name: 'CHANGE_TARGET', value: 'develop'
186+
}
187+
allOf {
188+
environment name: 'CHANGE_ID', value: ''
189+
anyOf {
190+
allOf {
191+
branch 'develop'
192+
not { changelog '.*^Automated release [0-9\\.]+$' }
193+
}
194+
branch 'master'
177195
}
178196
}
179197
}
@@ -199,10 +217,16 @@ pipeline {
199217

200218
stage('SonarQube compare to master') {
201219
when {
202-
allOf {
203-
environment name: 'CHANGE_ID', value: ''
204-
branch 'develop'
205-
not { changelog '.*^Automated release [0-9\\.]+$' }
220+
anyOf {
221+
allOf {
222+
not { environment name: 'CHANGE_ID', value: '' }
223+
environment name: 'CHANGE_TARGET', value: 'develop'
224+
}
225+
allOf {
226+
environment name: 'CHANGE_ID', value: ''
227+
branch 'develop'
228+
not { changelog '.*^Automated release [0-9\\.]+$' }
229+
}
206230
}
207231
}
208232
steps {

cypress.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');
22

33
module.exports = defineConfig({
44
viewportWidth: 1280,
5-
defaultCommandTimeout: 8888,
5+
defaultCommandTimeout: 5000,
66
chromeWebSecurity: false,
77
reporter: 'junit',
88
video: true,
99
retries: {
10-
runMode: 8,
10+
runMode: 1,
1111
openMode: 0,
1212
},
1313
reporterOptions: {

locales/en/LC_MESSAGES/volto.po

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
msgid ""
2+
msgstr ""
3+
"Project-Id-Version: \n"
4+
"Report-Msgid-Bugs-To: \n"
5+
"POT-Creation-Date: \n"
6+
"PO-Revision-Date: \n"
7+
"Last-Translator: \n"
8+
"Language: \n"
9+
"Language-Team: \n"
10+
"Content-Type: \n"
11+
"Content-Transfer-Encoding: \n"
12+
"Plural-Forms: \n"
13+
14+

package.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,30 @@
2525
"@plone/scripts": "*",
2626
"babel-plugin-transform-class-properties": "^6.24.1",
2727
"cypress-fail-fast": "^5.0.1",
28-
"md5": "^2.3.0"
28+
"md5": "^2.3.0",
29+
"husky": "*",
30+
"lint-staged": "*"
31+
},
32+
"lint-staged": {
33+
"src/**/*.{js,jsx,ts,tsx,json}": [
34+
"make lint-fix",
35+
"make prettier-fix"
36+
],
37+
"src/**/*.{jsx}": [
38+
"make i18n"
39+
],
40+
"theme/**/*.{css,less}": [
41+
"make stylelint-fix"
42+
],
43+
"src/**/*.{css,less}": [
44+
"make stylelint-fix"
45+
],
46+
"theme/**/*.overrides": [
47+
"make stylelint-fix"
48+
],
49+
"src/**/*.overrides": [
50+
"make stylelint-fix"
51+
]
2952
},
3053
"scripts": {
3154
"release": "release-it",
@@ -44,6 +67,7 @@
4467
"lint:fix": "make lint-fix",
4568
"i18n": "make i18n",
4669
"cypress:run": "make cypress-run",
47-
"cypress:open": "make cypress-open"
70+
"cypress:open": "make cypress-open",
71+
"prepare": "husky install"
4872
}
4973
}

0 commit comments

Comments
 (0)