nifty-wallet/.circleci/config.yml

420 lines
10 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
2019-09-03 09:12:32 -07:00
# - prep-scss:
# requires:
# - prep-deps-npm
2018-09-07 04:03:44 -07:00
- test-lint:
requires:
- prep-deps-npm
2019-03-17 14:12:52 -07:00
# - 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
2019-03-27 10:46:07 -07:00
# - test-integration-mascara-firefox:
# requires:
# - prep-deps-npm
# - prep-scss
2018-09-07 04:03:44 -07:00
- test-integration-flat-chrome:
requires:
- prep-deps-npm
2019-09-03 09:12:32 -07:00
# - prep-scss
2018-09-07 04:03:44 -07:00
- test-integration-flat-firefox:
requires:
- prep-deps-npm
2019-09-03 09:12:32 -07:00
# - prep-scss
2018-09-07 04:03:44 -07:00
- all-tests-pass:
requires:
- test-lint
- test-unit
- test-e2e-chrome
# - test-e2e-firefox
2019-06-28 06:56:33 -07:00
# - test-integration-mascara-chrome
# - test-integration-mascara-firefox
2018-09-07 04:03:44 -07:00
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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: |
2020-02-21 04:53:15 -08:00
sudo npm install -g npm@6.13.4 && 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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
2019-03-17 14:12:52 -07:00
# test-deps:
# docker:
2020-03-25 13:48:24 -07:00
# - image: circleci/node:10.19.0-browsers
2019-03-17 14:12:52 -07:00
# steps:
# - checkout
# - restore_cache:
# key: dependency-cache-{{ .Revision }}
# - run:
# name: Test
# command: sudo npm install -g npm@6.4.1 && npm audit
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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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 }}
2019-03-27 09:57:11 -07:00
- run: #STABLE
name: Install Chromedriver latest version
command: |
# sudo apt-get update
# sudo apt-get install lsb-release libappindicator3-1
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome.deb
sudo sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
rm google-chrome.deb
2018-09-07 02:12:49 -07:00
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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
2018-10-25 10:37:04 -07:00
command: ./.circleci/scripts/firefox-install
2018-09-07 02:12:49 -07:00
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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
2018-10-25 10:37:04 -07:00
command: ./.circleci/scripts/firefox-install
2018-09-07 02:12:49 -07:00
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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
2018-03-30 01:01:16 -07:00
test-unit:
docker:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
2018-10-25 10:37:04 -07:00
command: ./.circleci/scripts/firefox-install
2018-09-07 02:12:49 -07:00
- restore_cache:
key: dependency-cache-{{ .Revision }}
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-firefox-{{ .Revision }}
- run:
name: Install firefox
2018-10-25 10:37:04 -07:00
command: ./.circleci/scripts/firefox-install
2018-09-07 02:12:49 -07:00
- restore_cache:
key: dependency-cache-{{ .Revision }}
- 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:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- checkout
- restore_cache:
key: dependency-cache-{{ .Revision }}
- run:
name: test:integration:mascara
command: npm run test:mascara
all-tests-pass:
docker:
2020-03-25 13:48:24 -07:00
- image: circleci/node:10.19.0-browsers
steps:
2018-09-07 02:12:49 -07:00
- run:
name: All Tests Passed
command: echo 'weew - everything passed!'