-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(update): update to webpack 4, change mocha by jest
- Loading branch information
Pablo Roiback
committed
Jul 30, 2019
1 parent
8a21541
commit 8f36fea
Showing
28 changed files
with
17,295 additions
and
10,546 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,6 +1,10 @@ | ||
{ | ||
"presets": ["es2015", "react"], | ||
"presets": [ | ||
"react", | ||
"env" | ||
], | ||
"plugins": [ | ||
"add-module-exports" | ||
] | ||
"transform-runtime", | ||
"transform-object-rest-spread" | ||
], | ||
} |
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,5 @@ | ||
**/dist/** | ||
**/deploy/** | ||
**/node_modules/** | ||
**/coverage/** | ||
webpack.config*.js | ||
webpack.*.js |
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
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 |
---|---|---|
|
@@ -30,4 +30,8 @@ dist | |
.history | ||
|
||
# MAC | ||
.DS_Store | ||
.DS_Store | ||
|
||
deploy/builds | ||
|
||
stats.json |
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,30 +1,69 @@ | ||
image: jramcast/node-openjdk | ||
image: node:10-alpine | ||
|
||
stages: | ||
- test | ||
- quality | ||
- deploy | ||
|
||
variables: | ||
SONAR_URL: 'http://sonarqube.services.prod.roiback:9000' | ||
SONAR_LOGIN: '56b121aa8ef455cea81c9088cf0bd102c8fc314e' | ||
|
||
cache: | ||
key: ${CI_COMMIT_REF_SLUG} | ||
paths: | ||
- node_modules/ | ||
- sonar-scanner-2.6.1/ | ||
|
||
lint: | ||
stage: test | ||
script: | ||
- npm install | ||
- npm ci | ||
- npm run lint | ||
|
||
unit_tests: | ||
stage: test | ||
script: | ||
- npm install | ||
- npm test | ||
- npm run check-coverage | ||
- "[ -d sonar-scanner-2.6.1 ] || curl --insecure -OL https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-2.6.1.zip" | ||
- "[ -d sonar-scanner-2.6.1 ] || unzip sonar-scanner-2.6.1.zip" | ||
- ./sonar-scanner-2.6.1/bin/sonar-scanner -Dsonar.host.url=http://registry.roiback.com:9000 | ||
- npm ci | ||
- npm run test:ci | ||
artifacts: | ||
paths: | ||
- coverage | ||
expire_in: 1 day | ||
|
||
|
||
|
||
publish: | ||
stage: deploy | ||
script: | ||
- npm install | ||
- npm ci | ||
- npm run dist | ||
- npm publish | ||
only: | ||
- tags | ||
- triggers | ||
|
||
|
||
sonar-quality-gate: | ||
image: jramcast/gitlab-ci-sonarqube | ||
stage: quality | ||
script: | ||
# Publica report en sonarqube y Chequea si pasamos el quality gate | ||
- sonar-scanner -Dsonar.projectVersion=${CI_COMMIT_SHA} | ||
# No está claro todavía como vamos a configurar los quality gates de sonarqube para que fallen | ||
# Así que de momento, prefiero no bloquear los pipelines | ||
allow_failure: true | ||
|
||
|
||
sonar-comments: | ||
image: jramcast/gitlab-ci-sonarqube | ||
stage: quality | ||
except: | ||
- master | ||
script: | ||
# Añade comentarios en Gitlab con los issues encontrados (sin publicar report). | ||
# Para esto es necesario configurar el Gitlab User Token en la config del proyecto | ||
# http://sonarqube.services.prod.roiback:9000/project/settings?category=gitlab&id=bookcore_client | ||
- sonar-scanner-preview -Dsonar.projectVersion=${CI_COMMIT_SHA} | ||
# No está claro todavía como vamos a configurar los fallos de sonarqube | ||
# Así que de momento, prefiero no bloquear los pipelines | ||
allow_failure: true |
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
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
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,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<title>skeleton css component deployed</title> | ||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
</head> | ||
|
||
<body> | ||
<div id="content"></div> | ||
</body> | ||
|
||
</html> |
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,24 @@ | ||
module.exports = { | ||
setupTestFrameworkScriptFile: '<rootDir>test/setup.js', | ||
collectCoverage: true, | ||
coverageDirectory: 'coverage/', | ||
coverageReporters: ['lcov', 'text'], | ||
collectCoverageFrom: ['src/**/*.(js|jsx)'], | ||
coverageThreshold: { | ||
global: { | ||
branches: 70, | ||
functions: 50, | ||
lines: 50, | ||
statements: -10, | ||
}, | ||
}, | ||
testMatch: ['<rootDir>/test/*test.js'], | ||
transform: { | ||
'^.+\\.(js|jsx)$': 'babel-jest', | ||
}, | ||
verbose: true, | ||
transformIgnorePatterns: ['/node_modules/(?!roi-.*)'], | ||
moduleNameMapper: { | ||
'.svg': '<rootDir>/test/__mocks__/fileMock.js', | ||
}, | ||
}; |
Oops, something went wrong.