forked from italia/design-comuni-plone-theme
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgraded project configuration and added cypress
- Loading branch information
Showing
32 changed files
with
6,216 additions
and
1,318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1 @@ | ||
build | ||
cache | ||
coverage | ||
data | ||
docker-compose.* | ||
Dockerfile | ||
.DS_Store | ||
.env.development.local | ||
.env.local | ||
.env.production.local | ||
.env.test.local | ||
.git | ||
.gitignore | ||
.history | ||
locales/*.json | ||
*.log | ||
logs | ||
node_modules | ||
npm-debug.log* | ||
omelette | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
container-query-polyfill.modern.js | ||
cypress | ||
node_modules | ||
acceptance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"extends": ["react-app", "prettier", "plugin:jsx-a11y/recommended"], | ||
"plugins": ["prettier", "react-hooks", "jsx-a11y"], | ||
"env": { | ||
"es6": true, | ||
"browser": true, | ||
"node": true, | ||
"mocha": true, | ||
"jasmine": true | ||
}, | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"legacyDecorators": true | ||
} | ||
}, | ||
"rules": { | ||
"import/no-unresolved": 0, | ||
"no-alert": 1, | ||
"no-console": 1, | ||
"no-debugger": 1, | ||
"prettier/prettier": [ | ||
"error", | ||
{ "trailingComma": "all", "singleQuote": true } | ||
], | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react/react-in-jsx-scope": "off" | ||
}, | ||
"globals": { | ||
"root": true, | ||
"__DEVELOPMENT__": true, | ||
"__CLIENT__": true, | ||
"__SERVER__": true, | ||
"__DISABLE_SSR__": true, | ||
"__DEVTOOLS__": true, | ||
"__DEBUG__": true, | ||
"__SSR__": true, | ||
"__SENTRY__": true, | ||
"cy": true, | ||
"Cypress": true, | ||
"jest": true, | ||
"socket": true, | ||
"webpackIsomorphicTools": true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Acceptance tests | ||
on: [push] | ||
|
||
env: | ||
ADDON_NAME: "design-comuni-plone-theme" | ||
ADDON_PATH: "design-comuni-plone-theme" | ||
VOLTO_VERSION: "17.0.0" | ||
|
||
jobs: | ||
|
||
acceptance: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Install Cypress | ||
run: | | ||
cd acceptance | ||
yarn | ||
- name: "Cypress: Acceptance tests" | ||
uses: cypress-io/github-action@v6 | ||
env: | ||
BABEL_ENV: production | ||
CYPRESS_RETRIES: 2 | ||
with: | ||
parallel: false | ||
browser: chrome | ||
working-directory: acceptance | ||
spec: cypress/tests/*.js | ||
install: false | ||
start: | | ||
docker compose -f ci.yml --profile prod up | ||
wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000' | ||
|
||
# Upload Cypress screenshots | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-screenshots-acceptance | ||
path: acceptance/cypress/screenshots | ||
|
||
# Upload Cypress videos | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: cypress-videos-acceptance | ||
path: acceptance/cypress/videos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Code analysis checks | ||
on: [push] | ||
jobs: | ||
codeanalysis: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
steps: | ||
- name: Main checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Linting | ||
run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ locales/*.json | |
|
||
# Yarn 3 | ||
.pnp.* | ||
.yarn/* | ||
**/.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
container-query-polyfill.modern.js | ||
CHANGELOG.md | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": "*.overrides", | ||
"options": { | ||
"parser": "less" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"extends": [ | ||
"stylelint-config-idiomatic-order" | ||
], | ||
"plugins": [ | ||
"stylelint-prettier" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.less" | ||
], | ||
"customSyntax": "postcss-less" | ||
}, | ||
{ | ||
"files": [ | ||
"**/*.overrides" | ||
], | ||
"customSyntax": "postcss-less" | ||
}, | ||
{ | ||
"files": [ | ||
"**/*.scss" | ||
], | ||
"customSyntax": "postcss-scss" | ||
} | ||
], | ||
"rules": { | ||
"prettier/prettier": true, | ||
"order/properties-alphabetical-order": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
defaultSemverRangePrefix: "" | ||
|
||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.3.cjs |
Oops, something went wrong.