Skip to content

Commit

Permalink
ci: Add build:test Gulp task for e2e build
Browse files Browse the repository at this point in the history
  • Loading branch information
whymarrh committed Mar 29, 2019
1 parent 99f53f5 commit 7fc84f3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 14 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down

0 comments on commit 7fc84f3

Please sign in to comment.