nifty-wallet/.circleci/config.yml

441 lines
11 KiB
YAML
Raw Normal View History

2018-03-09 12:47:01 -08:00
version: 2
workflows:
version: 2
full_test:
2018-03-09 12:47:01 -08:00
jobs:
2018-09-07 02:12:49 -07:00
- prep-deps-npm
- prep-build:
requires:
- prep-deps-npm
2018-09-07 04:03:44 -07:00
- prep-docs:
requires:
- prep-deps-npm
- prep-scss:
requires:
- prep-deps-npm
- test-lint:
requires:
- prep-deps-npm
- test-deps:
requires:
- prep-deps-npm
2018-09-07 02:12:49 -07:00
- test-e2e-chrome:
requires:
- prep-deps-npm
- prep-build
- test-e2e-firefox:
requires:
- prep-deps-npm
- prep-build
2018-09-07 04:03:44 -07:00
- test-unit:
requires:
- prep-deps-npm
- test-integration-mascara-chrome:
requires:
- prep-deps-npm
- prep-scss
- test-integration-mascara-firefox:
requires:
- prep-deps-npm
- prep-scss
- test-integration-flat-chrome:
requires:
- prep-deps-npm
- prep-scss
- test-integration-flat-firefox:
requires:
- prep-deps-npm
- prep-scss
- all-tests-pass:
requires:
- test-lint
- test-unit
- test-e2e-chrome
- test-e2e-firefox
- test-integration-mascara-chrome
- test-integration-mascara-firefox
- test-integration-flat-chrome
- test-integration-flat-firefox
- job-screens:
requires:
- prep-deps-npm
- prep-build
# - all-tests-pass
- job-publish-prerelease:
requires:
- prep-deps-npm
- prep-build
- job-screens
# - all-tests-pass
- job-publish-release:
filters:
branches:
only: master
requires:
- prep-deps-npm
- prep-build
- prep-docs
- job-screens
# - all-tests-pass
- job-publish-postrelease:
filters:
branches:
only: master
requires:
- prep-deps-npm
- prep-build
- prep-docs
- job-screens
# - all-tests-pass
2018-03-09 12:47:01 -08:00
2018-03-09 12:38:28 -08:00
jobs:
prep-deps-npm:
2018-03-09 12:38:28 -08:00
docker:
- image: circleci/node:8.12.0-browsers
2018-03-09 12:38:28 -08:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Install npm 6 + deps via npm
command: |
2018-09-19 08:49:43 -07:00
sudo npm install -g npm@6.4.1 && npm install --no-save
2018-09-07 02:12:49 -07:00
- save_cache:
key: dependency-cache-{{ .Revision }}
paths:
- node_modules
2018-03-09 14:58:02 -08:00
2018-03-27 14:16:58 -07:00
prep-build:
docker:
- image: circleci/node:8.12.0-browsers
2018-03-27 14:16:58 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: build:dist
command: NODE_ENV='production' npm run dist
- run:
name: build:debug
command: find dist/ -type f -exec md5sum {} \; | sort -k 2
- save_cache:
key: build-cache-{{ .Revision }}
paths:
- dist
- builds
2018-05-18 11:50:46 -07:00
prep-docs:
docker:
- image: circleci/node:8.12.0-browsers
2018-05-18 11:50:46 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: build:dist
command: npm run doc
- save_cache:
key: docs-cache-{{ .Revision }}
paths:
- docs/jsdoc
2018-05-18 11:50:46 -07:00
prep-scss:
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
- run:
name: Build for integration tests
command: npm run test:integration:build
- save_cache:
key: scss-cache-{{ checksum "scss_checksum" }}
paths:
- ui/app/css/output
test-lint:
2018-03-09 12:38:28 -08:00
docker:
- image: circleci/node:8.12.0-browsers
2018-03-09 12:38:28 -08:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Test
command: npm run lint
2018-05-02 11:05:39 -07:00
test-deps:
docker:
- image: circleci/node:8.12.0-browsers
2018-05-02 11:05:39 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Test
command: npx nsp check
2018-05-02 11:05:39 -07:00
2018-05-01 12:18:22 -07:00
test-e2e-chrome:
2018-03-27 13:36:09 -07:00
docker:
- image: circleci/node:8.12.0-browsers
2018-03-27 13:36:09 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: test:e2e:chrome
command: npm run test:e2e:chrome
- store_artifacts:
path: test-artifacts
destination: test-artifacts
2018-05-18 11:09:07 -07:00
2018-05-01 12:18:22 -07:00
test-e2e-firefox:
docker:
- image: circleci/node:8.12.0-browsers
2018-05-01 12:18:22 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: test:e2e:firefox
command: npm run test:e2e:firefox
- store_artifacts:
path: test-artifacts
destination: test-artifacts
2018-03-27 13:36:09 -07:00
2018-05-28 09:22:48 -07:00
test-e2e-beta-chrome:
docker:
- image: circleci/node:8.12.0-browsers
2018-05-28 09:22:48 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: test:e2e:chrome:beta
command: npm run test:e2e:chrome:beta
- store_artifacts:
path: test-artifacts
destination: test-artifacts
2018-05-28 09:22:48 -07:00
test-e2e-beta-firefox:
docker:
- image: circleci/node:8.12.0-browsers
2018-05-28 09:22:48 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: test:e2e:firefox:beta
command: npm run test:e2e:firefox:beta
- store_artifacts:
path: test-artifacts
destination: test-artifacts
2018-05-28 09:22:48 -07:00
job-screens:
2018-03-30 01:01:16 -07:00
docker:
- image: circleci/node:8.12.0-browsers
2018-03-30 01:01:16 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- run:
name: Test
command: npm run test:screens
- save_cache:
key: job-screens-{{ .Revision }}
paths:
- test-artifacts
job-publish-prerelease:
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- restore_cache:
key: job-screens-{{ .Revision }}
- store_artifacts:
path: dist/mascara
destination: builds/mascara
- store_artifacts:
path: dist/sourcemaps
destination: builds/sourcemaps
- store_artifacts:
path: builds
destination: builds
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- run:
name: build:announce
command: ./development/metamaskbot-build-announce.js
2018-05-18 11:29:10 -07:00
job-publish-release:
docker:
- image: circleci/node:8.12.0-browsers
2018-05-18 11:29:10 -07:00
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
2018-07-26 11:10:42 -07:00
key: dependency-cache-{{ .Revision }}
2018-09-07 02:12:49 -07:00
- restore_cache:
2018-07-26 11:10:42 -07:00
key: build-cache-{{ .Revision }}
2018-09-07 02:12:49 -07:00
- run:
name: build:release
command: node ./development/publish-release.js
2018-07-27 13:51:04 -07:00
job-publish-postrelease:
2018-09-07 02:12:49 -07:00
docker:
- image: circleci/node:8.12.0-browsers
2018-09-07 02:12:49 -07:00
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- restore_cache:
key: build-cache-{{ .Revision }}
- restore_cache:
key: docs-cache-{{ .Revision }}
- restore_cache:
key: job-screens-{{ .Revision }}
- run:
name: sentry sourcemaps upload
command: npm run sentry:publish
# - run:
# name: github gh-pages docs publish
# command: >
# git config user.name metamaskbot
# git config user.email admin@metamask.io
# gh-pages -d docs/jsdocs
2018-03-30 01:01:16 -07:00
test-unit:
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: test:coverage
command: npm run test:coverage
test-integration-flat-firefox:
environment:
2018-03-10 11:13:27 -08:00
browsers: '["Firefox"]'
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
- restore_cache:
key: scss-cache-{{ checksum "scss_checksum" }}
- run:
name: test:integration:flat
command: npm run test:flat
test-integration-flat-chrome:
environment:
2018-03-10 11:13:27 -08:00
browsers: '["Chrome"]'
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
- restore_cache:
key: scss-cache-{{ checksum "scss_checksum" }}
- run:
name: test:integration:flat
command: npm run test:flat
test-integration-mascara-firefox:
environment:
2018-03-10 11:13:27 -08:00
browsers: '["Firefox"]'
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
command: ./.circleci/scripts/firefox-install.sh
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
- restore_cache:
key: scss-cache-{{ checksum "scss_checksum" }}
- run:
name: test:integration:mascara
command: npm run test:mascara
test-integration-mascara-chrome:
environment:
2018-03-10 11:13:27 -08:00
browsers: '["Chrome"]'
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: Get Scss Cache key
# this allows us to checksum against a whole directory
command: find ui/app/css -type f -exec md5sum {} \; | sort -k 2 > scss_checksum
- restore_cache:
key: scss-cache-{{ checksum "scss_checksum" }}
- run:
name: test:integration:mascara
command: npm run test:mascara
all-tests-pass:
docker:
- image: circleci/node:8.12.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- run:
name: All Tests Passed
command: echo 'weew - everything passed!'