Skip to content

Commit

Permalink
test: EN locales, pre-commit fix, feature PRs checks Refs #257193
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed Sep 5, 2023
1 parent 2adc1c1 commit 7e6713d
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,2 @@
[ -n "$CI" ] && exit 0
yarn lint-staged
66 changes: 45 additions & 21 deletions Jenkinsfile
Expand Up @@ -62,11 +62,17 @@ pipeline {

stage('Tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -110,11 +116,17 @@ pipeline {

stage('Integration tests') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
not { changelog '.*^Automated release [0-9\\.]+$' }
branch 'master'
}
}
}
}
Expand Down Expand Up @@ -167,13 +179,19 @@ pipeline {

stage('Report to SonarQube') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
branch 'master'
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
anyOf {
allOf {
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
branch 'master'
}
}
}
Expand All @@ -199,10 +217,16 @@ pipeline {

stage('SonarQube compare to master') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
anyOf {
allOf {
not { environment name: 'CHANGE_ID', value: '' }
environment name: 'CHANGE_TARGET', value: 'develop'
}
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'develop'
not { changelog '.*^Automated release [0-9\\.]+$' }
}
}
}
steps {
Expand Down
4 changes: 2 additions & 2 deletions cypress.config.js
Expand Up @@ -2,12 +2,12 @@ const { defineConfig } = require('cypress');

module.exports = defineConfig({
viewportWidth: 1280,
defaultCommandTimeout: 8888,
defaultCommandTimeout: 5000,
chromeWebSecurity: false,
reporter: 'junit',
video: true,
retries: {
runMode: 8,
runMode: 1,
openMode: 0,
},
reporterOptions: {
Expand Down
14 changes: 14 additions & 0 deletions locales/en/LC_MESSAGES/volto.po
@@ -0,0 +1,14 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language: \n"
"Language-Team: \n"
"Content-Type: \n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"


28 changes: 26 additions & 2 deletions package.json
Expand Up @@ -24,7 +24,30 @@
"@plone/scripts": "*",
"babel-plugin-transform-class-properties": "^6.24.1",
"cypress-fail-fast": "^5.0.1",
"md5": "^2.3.0"
"md5": "^2.3.0",
"husky": "*",
"lint-staged": "*"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
"make lint-fix",
"make prettier-fix"
],
"src/**/*.{jsx}": [
"make i18n"
],
"theme/**/*.{css,less}": [
"make stylelint-fix"
],
"src/**/*.{css,less}": [
"make stylelint-fix"
],
"theme/**/*.overrides": [
"make stylelint-fix"
],
"src/**/*.overrides": [
"make stylelint-fix"
]
},
"scripts": {
"release": "release-it",
Expand All @@ -39,6 +62,7 @@
"lint": "../../../node_modules/eslint/bin/eslint.js --max-warnings=0 'src/**/*.{js,jsx}'",
"lint:fix": "../../../node_modules/eslint/bin/eslint.js --fix 'src/**/*.{js,jsx}'",
"cypress:run": "../../../node_modules/cypress/bin/cypress run",
"cypress:open": "../../../node_modules/cypress/bin/cypress open"
"cypress:open": "../../../node_modules/cypress/bin/cypress open",
"prepare": "husky install"
}
}

0 comments on commit 7e6713d

Please sign in to comment.