1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +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: - test-e2e-chrome:
requires: requires:
- prep-deps-npm - prep-deps-npm
- prep-build
- test-e2e-firefox: - test-e2e-firefox:
requires: requires:
- prep-deps-npm - prep-deps-npm
- prep-build
# - test-e2e-beta-drizzle: # - test-e2e-beta-drizzle:
# requires: # requires:
# - prep-deps-npm # - prep-deps-npm
@ -191,7 +189,8 @@ jobs:
at: . at: .
- run: - run:
name: test:e2e:chrome 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: - store_artifacts:
path: test-artifacts path: test-artifacts
destination: test-artifacts destination: test-artifacts
@ -208,7 +207,8 @@ jobs:
at: . at: .
- run: - run:
name: test:e2e:firefox 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: - store_artifacts:
path: test-artifacts path: test-artifacts
destination: 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:extension:js', devMode: true })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:test-extension:js', devMode: true, testing: 'true' }) createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'dev:test-extension:js', devMode: true, testing: 'true' })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' }) createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:extension:js' })
createTasksForBuildJsExtension({ buildJsFiles, taskPrefix: 'build:test:extension:js', testing: 'true' })
function createTasksForBuildJsUIDeps ({ dependenciesToBundle, filename }) { function createTasksForBuildJsUIDeps ({ dependenciesToBundle, filename }) {
const destinations = browserPlatforms.map(platform => `./dist/${platform}`) 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.task('build:extension',
gulp.series( gulp.series(
'clean', 'clean',

View File

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