1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

ci: Add build:test Gulp task for e2e build

This commit is contained in:
Whymarrh Whitby 2019-03-28 14:13:11 -02:30
parent 99f53f5827
commit 7fc84f3cc0
3 changed files with 19 additions and 4 deletions

View File

@ -23,11 +23,9 @@ workflows:
- test-e2e-chrome:
requires:
- prep-deps-npm
- prep-build
- test-e2e-firefox:
requires:
- prep-deps-npm
- prep-build
# - test-e2e-beta-drizzle:
# requires:
# - prep-deps-npm
@ -191,7 +189,8 @@ jobs:
at: .
- run:
name: test:e2e:chrome
command: npm run test:e2e:chrome
command: npm run build:test && npm run test:e2e:chrome
no_output_timeout: 20m
- store_artifacts:
path: test-artifacts
destination: test-artifacts
@ -208,7 +207,8 @@ jobs:
at: .
- run:
name: test:e2e:firefox
command: npm run test:e2e:firefox
command: npm run build:test && npm run test:e2e:chrome
no_output_timeout: 20m
- store_artifacts:
path: test-artifacts
destination: test-artifacts

View File

@ -313,6 +313,7 @@ createTasksForBuildJsUIDeps({ dependenciesToBundle: uiDependenciesToBundle, file
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:extension:js', devMode: true })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:test-extension:js', devMode: true, testing: 'true' })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:test:extension:js', testing: 'true' })
function createTasksForBuildJsUIDeps ({ dependenciesToBundle, filename }) {
const destinations = browserPlatforms.map(platform => `./dist/${platform}`)
@ -445,6 +446,19 @@ gulp.task('build',
)
)
gulp.task('build:test',
gulp.series(
'clean',
'build:scss',
gulpParallel(
'build:extension:js:uideps',
'build:test:extension:js',
'copy'
),
'manifest:testing'
)
)
gulp.task('build:extension',
gulp.series(
'clean',

View File

@ -8,6 +8,7 @@
"doc": "jsdoc -c development/tools/.jsdoc.json",
"publish-docs": "gh-pages -d docs/jsdocs",
"start:test": "gulp dev:test",
"build:test": "gulp build:test",
"test": "npm run test:unit && npm run test:integration && npm run lint",
"watch:test:unit": "nodemon --exec \"npm run test:unit\" ./test ./app ./ui",
"test:unit": "cross-env METAMASK_ENV=test mocha --exit --require test/setup.js --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"",