From 6444f0d43178c52d3ea7488bc6fe29ccf77d6d32 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 13:13:02 +0530 Subject: [PATCH 01/18] WIP --- .circleci/config.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26383b3bd..fe65e9fca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: - checkout - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - - run: yarn + - run: yarn install - run: sudo npm i truffle -g - run: node --version - run: truffle version @@ -23,7 +23,7 @@ jobs: - checkout - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - - run: yarn + - run: yarn install - run: sudo npm i truffle -g - run: node --version - run: truffle version @@ -39,7 +39,7 @@ jobs: - checkout - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - - run: yarn + - run: yarn install - run: sudo npm i truffle -g - run: node --version - run: truffle version @@ -55,7 +55,7 @@ jobs: - checkout - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - - run: yarn + - run: yarn install - run: sudo npm i truffle -g - run: node --version - run: truffle version @@ -68,7 +68,5 @@ workflows: version: 2 build-test-coverage-docs: jobs: - - build - test - - coverage - - docs \ No newline at end of file + - coverage \ No newline at end of file From 7ed52080b5ec7224e15bc07d9dbdb2567ba2ce0e Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 13:30:49 +0530 Subject: [PATCH 02/18] CircleCI changes --- .circleci/config.yml | 17 +++++++++++++++-- scripts/coverage.sh | 2 +- scripts/test.sh | 25 ++++++++++--------------- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fe65e9fca..cff30c3ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,7 +66,20 @@ jobs: - node_modules workflows: version: 2 - build-test-coverage-docs: + commit: jobs: + - build - test - - coverage \ No newline at end of file + daily-coverage: + triggers: + - schedule: + cron: "0 0 * * *" + jobs: + - coverage + docs: + filters: + branches: + only: + - master + jobs: + - docs \ No newline at end of file diff --git a/scripts/coverage.sh b/scripts/coverage.sh index e42ed6a84..5d1e2a24e 100755 --- a/scripts/coverage.sh +++ b/scripts/coverage.sh @@ -2,4 +2,4 @@ rm -rf flat -TRAVIS_PULL_REQUEST=true scripts/test.sh \ No newline at end of file +COVERAGE=true scripts/test.sh \ No newline at end of file diff --git a/scripts/test.sh b/scripts/test.sh index 6dd3ce95a..fa569144f 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -19,11 +19,7 @@ cleanup() { fi } -if ! [ -z "${TRAVIS_PULL_REQUEST+x}" ] && [ "$TRAVIS_PULL_REQUEST" != false ]; then - testrpc_port=8545 -else - testrpc_port=8545 -fi +testrpc_port=8545 testrpc_running() { nc -z localhost "$testrpc_port" @@ -60,20 +56,19 @@ start_testrpc() { --account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501209,1000000000000000000000000" ) - if ! [ -z "${TRAVIS_PULL_REQUEST+x}" ] && [ "$TRAVIS_PULL_REQUEST" != false ]; then + if [ "$COVERAGE" = true ]; then node_modules/.bin/testrpc-sc --gasLimit 0xfffffffffff --port "$testrpc_port" "${accounts[@]}" > /dev/null & else node_modules/.bin/ganache-cli --gasLimit 8000000 "${accounts[@]}" > /dev/null & fi - testrpc_pid=$! } if testrpc_running; then echo "Using existing testrpc instance" - # Do not start ethereum bridge unless it is a cron job from travis - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then + # Do not start ethereum bridge unless it is a cron job + if [ "$CIRCLE_CI_CRON" = true ]; then bridge_running if bridge_running; then echo "Using existing ethereum-bridge instance" @@ -85,23 +80,23 @@ if testrpc_running; then else echo "Starting our own testrpc instance" start_testrpc - # Do not start ethereum bridge unless it is a cron job from travis - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then + # Do not start ethereum bridge unless it is a cron job + if [ "$CIRCLE_CI_CRON" = true ]; then echo "Starting our own ethereum-bridge instance" sleep 10 start_bridge fi fi -if ! [ -z "${TRAVIS_PULL_REQUEST+x}" ] && [ "$TRAVIS_PULL_REQUEST" != false ]; then +if [ "$COVERAGE" = true ]; then curl -o node_modules/solidity-coverage/lib/app.js https://raw.githubusercontent.com/maxsam4/solidity-coverage/relative-path/lib/app.js node_modules/.bin/solidity-coverage - if [ "$CONTINUOUS_INTEGRATION" = true ]; then + if [ "$CI" = true ]; then cat coverage/lcov.info | node_modules/.bin/coveralls fi else - # Do not run a_poly_oracle,js tests unless it is a cron job from travis - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then + # Do not run a_poly_oracle,js tests unless it is a cron job + if [ "$CIRCLE_CI_CRON" = true ]; then node_modules/.bin/truffle test `ls test/*.js` else node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js` From 6081cc8979ac19ae569bb5c6b40735f7357085ec Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 13:33:29 +0530 Subject: [PATCH 03/18] CircleCI changes --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cff30c3ee..450b659a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,6 +74,12 @@ workflows: triggers: - schedule: cron: "0 0 * * *" + filters: + branches: + only: + - master + - development-2.1.0 + - development-3.0.0 jobs: - coverage docs: From 67ceb1b6b580f6239ccf2b5d1aa01388e4aec703 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 13:36:04 +0530 Subject: [PATCH 04/18] CircleCI changes --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 450b659a2..d74a38924 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -83,9 +83,9 @@ workflows: jobs: - coverage docs: - filters: - branches: - only: - - master jobs: - - docs \ No newline at end of file + - docs: + filters: + branches: + only: + - master \ No newline at end of file From a4facea3d032c49016114884d821bb13cf11e064 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 13:47:32 +0530 Subject: [PATCH 05/18] Badge --- .circleci/config.yml | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d74a38924..421f32002 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,6 +70,7 @@ workflows: jobs: - build - test + - coverage daily-coverage: triggers: - schedule: diff --git a/README.md b/README.md index 8c5ae0a4e..c810f039a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/PolymathNetwork/polymath-core.svg?branch=master)](https://travis-ci.org/PolymathNetwork/polymath-core) +[![CircleCI](https://circleci.com/gh/maxsam4/polymath-core.svg?style=svg)](https://circleci.com/gh/maxsam4/polymath-core) [![Coverage Status](https://coveralls.io/repos/github/PolymathNetwork/polymath-core/badge.svg?branch=master)](https://coveralls.io/github/PolymathNetwork/polymath-core?branch=master) [![Gitter](https://img.shields.io/badge/chat-gitter-green.svg)](https://gitter.im/PolymathNetwork/Lobby) [![Telegram](https://img.shields.io/badge/50k+-telegram-blue.svg)](https://gitter.im/PolymathNetwork/Lobby) From adac3a5e8395501a3cc9c809b139f2c01eace109 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 14:18:02 +0530 Subject: [PATCH 06/18] Store test results --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 421f32002..105d4b9aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,6 +32,8 @@ jobs: key: dependency-cache-{{ checksum "package.json" }} paths: - node_modules + - store_test_results: + path: test-results coverage: docker: - image: circleci/node:8 @@ -48,6 +50,9 @@ jobs: key: dependency-cache-{{ checksum "package.json" }} paths: - node_modules + - store_test_results: + path: test-results + docs: docker: - image: circleci/node:8 From 084d04743cc0893cc51749f0803560666dbd7c6f Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 14:35:04 +0530 Subject: [PATCH 07/18] Removed coverage from commit workflow --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 105d4b9aa..de4dcba6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,7 +75,6 @@ workflows: jobs: - build - test - - coverage daily-coverage: triggers: - schedule: From e543061f78e79f3b9d92f2b3317023725d1cfe11 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 17:07:52 +0530 Subject: [PATCH 08/18] Added test reporter --- .circleci/config.yml | 8 +++----- .gitignore | 3 ++- package.json | 1 + scripts/test.sh | 6 ++++++ truffle-ci.js | 33 +++++++++++++++++++++++++++++++++ yarn.lock | 39 +++++++++++++++++++++++++++++++++++++-- 6 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 truffle-ci.js diff --git a/.circleci/config.yml b/.circleci/config.yml index de4dcba6b..47f5344f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,9 +50,6 @@ jobs: key: dependency-cache-{{ checksum "package.json" }} paths: - node_modules - - store_test_results: - path: test-results - docs: docker: - image: circleci/node:8 @@ -73,9 +70,9 @@ workflows: version: 2 commit: jobs: - - build - test - daily-coverage: + - coverage + daily-builds: triggers: - schedule: cron: "0 0 * * *" @@ -86,6 +83,7 @@ workflows: - development-2.1.0 - development-3.0.0 jobs: + - test - coverage docs: jobs: diff --git a/.gitignore b/.gitignore index 395634f11..f1aed51ad 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ bridge.log allFiredEvents extract/ extract.py -extract.zip \ No newline at end of file +extract.zip +/test-results \ No newline at end of file diff --git a/package.json b/package.json index 58104d99b..8f514a762 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "ethereum-bridge": "^0.6.1", "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.1.8", + "mocha-junit-reporter": "^1.18.0", "prettier": "^1.14.3", "sol-merger": "^0.1.2", "solidity-coverage": "^0.5.11", diff --git a/scripts/test.sh b/scripts/test.sh index fa569144f..12a3704c5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -95,6 +95,12 @@ if [ "$COVERAGE" = true ]; then cat coverage/lcov.info | node_modules/.bin/coveralls fi else + if [ "$CI" = true ]; then + mkdir test-results + mkdir test-results/mocha + rm truffle-config.js + mv truffle-ci.js truffle-config.js + fi # Do not run a_poly_oracle,js tests unless it is a cron job if [ "$CIRCLE_CI_CRON" = true ]; then node_modules/.bin/truffle test `ls test/*.js` diff --git a/truffle-ci.js b/truffle-ci.js new file mode 100644 index 000000000..f427eb332 --- /dev/null +++ b/truffle-ci.js @@ -0,0 +1,33 @@ +require('babel-register'); +require('babel-polyfill'); + +module.exports = { + networks: { + development: { + host: 'localhost', + port: 8545, + network_id: '*', // Match any network id + gas: 7900000, + }, + coverage: { + host: "localhost", + network_id: "*", + port: 8545, // <-- If you change this, also set the port option in .solcover.js. + gas: 0xfffffffffff, // <-- Use this high gas value + gasPrice: 0x01 // <-- Use this low gas price + } + }, + solc: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + mocha: { + enableTimeouts: false, + reporter: "mocha-junit-reporter", + reporterOptions: { + mochaFile: './test-results/mocha/results.xml' + } + } +}; diff --git a/yarn.lock b/yarn.lock index 31973936e..914397852 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1331,6 +1331,11 @@ chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" +charenc@~0.0.1: + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= + checkpoint-store@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" @@ -1656,6 +1661,11 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" +crypt@~0.0.1: + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= + crypto-browserify@3.12.0, crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -3444,7 +3454,7 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-buffer@^1.1.5: +is-buffer@^1.1.5, is-buffer@~1.1.1: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4100,6 +4110,15 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +md5@^2.1.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" + integrity sha1-U6s41f48iJG6RlMp6iP6wFQBJvk= + dependencies: + charenc "~0.0.1" + crypt "~0.0.1" + is-buffer "~1.1.1" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -4299,12 +4318,23 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0: +mkdirp@*, mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: minimist "0.0.8" +mocha-junit-reporter@^1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.18.0.tgz#9209a3fba30025ae3ae5e6bfe7f9c5bc3c2e8ee2" + integrity sha512-y3XuqKa2+HRYtg0wYyhW/XsLm2Ps+pqf9HaTAt7+MVUAKFJaNAHOrNseTZo9KCxjfIbxUWwckP5qCDDPUmjSWA== + dependencies: + debug "^2.2.0" + md5 "^2.1.0" + mkdirp "~0.5.1" + strip-ansi "^4.0.0" + xml "^1.0.0" + mocha@^4.0.1, mocha@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794" @@ -7047,6 +7077,11 @@ xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" +xml@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= + xmlhttprequest@*, xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" From 602b67e27d0cfe67d2e60494b6ffd1f5037372ed Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 17:19:47 +0530 Subject: [PATCH 09/18] Addded artifact collection --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47f5344f1..c17f9010e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,8 @@ jobs: - node_modules - store_test_results: path: test-results + - store_artifacts: + path: ./test-results/mocha/results.xml coverage: docker: - image: circleci/node:8 @@ -50,6 +52,8 @@ jobs: key: dependency-cache-{{ checksum "package.json" }} paths: - node_modules + - store_artifacts: + path: ./coverage/lcov.info docs: docker: - image: circleci/node:8 From 8793f08132b85f90fbf79987120cd1feac646409 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 17:34:11 +0530 Subject: [PATCH 10/18] Added parallelism --- .circleci/config.yml | 1 + scripts/test.sh | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c17f9010e..1dff7a561 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,7 @@ jobs: test: docker: - image: circleci/node:8 + parallelism: 2 steps: - checkout - restore_cache: diff --git a/scripts/test.sh b/scripts/test.sh index 12a3704c5..b0b99dd34 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -100,10 +100,11 @@ else mkdir test-results/mocha rm truffle-config.js mv truffle-ci.js truffle-config.js - fi - # Do not run a_poly_oracle,js tests unless it is a cron job - if [ "$CIRCLE_CI_CRON" = true ]; then - node_modules/.bin/truffle test `ls test/*.js` + if [ "$CIRCLE_CI_CRON" = true ]; then + node_modules/.bin/truffle test `ls test/*.js | circleci tests split --split-by=timings` + else + node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js | circleci tests split --split-by=timings` + fi else node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js` fi From 1c04aae38b1ee3932931cf526f32296b30e75a17 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 17:44:34 +0530 Subject: [PATCH 11/18] Comment --- scripts/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test.sh b/scripts/test.sh index b0b99dd34..2f4e5b057 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -100,6 +100,7 @@ else mkdir test-results/mocha rm truffle-config.js mv truffle-ci.js truffle-config.js + # only run poly oracle and upgrade tests if cron job by CI if [ "$CIRCLE_CI_CRON" = true ]; then node_modules/.bin/truffle test `ls test/*.js | circleci tests split --split-by=timings` else From 5c8017867f1af6f3d2eb2db3195d9be01a69769f Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 17:46:08 +0530 Subject: [PATCH 12/18] Bumped parallelism to 3 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dff7a561..e55982c40 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: test: docker: - image: circleci/node:8 - parallelism: 2 + parallelism: 3 steps: - checkout - restore_cache: From 526608d4b9e9dd01272d9337dd29d3124184ea15 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 17:51:23 +0530 Subject: [PATCH 13/18] Coverage requires approval --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e55982c40..78530ce94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,7 +76,8 @@ workflows: commit: jobs: - test - - coverage + - coverage: + type: approval daily-builds: triggers: - schedule: From 6329cc1b3b39035d69cb28346a71d1aa884551a9 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 18:06:20 +0530 Subject: [PATCH 14/18] Bumped parallelism to 4 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 78530ce94..d73bda085 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: test: docker: - image: circleci/node:8 - parallelism: 3 + parallelism: 4 steps: - checkout - restore_cache: From 01dfda9a45fa159ee1af9cdb51e78f09bf975f24 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 18:12:49 +0530 Subject: [PATCH 15/18] Removed manual approval --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d73bda085..e55982c40 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: test: docker: - image: circleci/node:8 - parallelism: 4 + parallelism: 3 steps: - checkout - restore_cache: @@ -76,8 +76,7 @@ workflows: commit: jobs: - test - - coverage: - type: approval + - coverage daily-builds: triggers: - schedule: From 1e81411eeff4709cb4a92aa613f7fec21b605fc8 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 20:09:16 +0530 Subject: [PATCH 16/18] Combine travis and CircleCI --- .circleci/config.yml | 9 ++++----- .travis.yml | 15 +-------------- README.md | 2 +- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e55982c40..986c13c2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: test: docker: - image: circleci/node:8 - parallelism: 3 + parallelism: 2 steps: - checkout - restore_cache: @@ -75,7 +75,6 @@ workflows: version: 2 commit: jobs: - - test - coverage daily-builds: triggers: @@ -85,10 +84,10 @@ workflows: branches: only: - master - - development-2.1.0 - - development-3.0.0 + - dev-2.1.0 + - dev-2.2.0 + - dev-3.0.0 jobs: - - test - coverage docs: jobs: diff --git a/.travis.yml b/.travis.yml index 2265b2d88..b676c5840 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,24 +4,11 @@ node_js: cache: directories: - node_modules -matrix: - fast_finish: true - allow_failures: - - env: 'TASK=docs' jobs: include: - - stage: Tests and Coverage - after_install: wget -O node_modules/solidity-coverage/lib/app.js https://raw.githubusercontent.com/maxsam4/solidity-coverage/relative-path/lib/app.js + - stage: test before_script: truffle version script: npm run test - - stage: Docs - env: 'TASK=docs' - before_install: - - echo -ne '\n' | sudo apt-add-repository -y ppa:hvr/z3 - - sudo apt-get -y update - - sudo apt-get -y install libz3-dev - before_script: wget -O node_modules/solidity-docgen/lib/index.js https://raw.githubusercontent.com/maxsam4/solidity-docgen/buffer-size/lib/index.js - script: npm run docs notifications: slack: secure: W4FZSabLrzF74f317hutolEHnlq2GBlQxU6b85L5XymrjgLEhlgE16c5Qz7Emoyt6le6PXL+sfG2ujJc3XYys/6hppgrHSAasuJnKCdQNpmMZ9BNyMs6WGkmB3enIf3K/FLXb26AQdwpQdIXuOeJUTf879u+YoiZV0eZH8d3+fsIOyovq9N6X5pKOpDM9iT8gGB4t7fie7xf51s+iUaHxyO9G7jDginZ4rBXHcU7mxCub9z+Z1H8+kCTnPWaF+KKVEXx4Z0nI3+urboD7E4OIP02LwrThQls2CppA3X0EoesTcdvj/HLErY/JvsXIFiFEEHZzB1Wi+k2TiOeLcYwEuHIVij+HPxxlJNX/j8uy01Uk8s4rd+0EhvfdKHJqUKqxH4YN2npcKfHEss7bU3y7dUinXQfYShW5ZewHdvc7pnnxBTfhvmdi64HdNrXAPq+s1rhciH7MmnU+tsm4lhrpr+FBuHzUMA9fOCr7b0SQytZEgWpiUls88gdbh3yG8TjyZxmZJGx09cwEP0q7VoH0UwFh7mIu5XmYdd5tWUhavTiO7YV8cUPn7MvwMsTltB3YBpF/fB26L7ka8zBhCsjm9prW6SVYU/dyO3m91VeZtO/zJFHRDA6Q58JGVW2rgzO39z193qC1EGRXqTie96VwAAtNg8+hRb+bI/CWDVzSPc= \ No newline at end of file diff --git a/README.md b/README.md index c810f039a..8c5ae0a4e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CircleCI](https://circleci.com/gh/maxsam4/polymath-core.svg?style=svg)](https://circleci.com/gh/maxsam4/polymath-core) +[![Build Status](https://travis-ci.org/PolymathNetwork/polymath-core.svg?branch=master)](https://travis-ci.org/PolymathNetwork/polymath-core) [![Coverage Status](https://coveralls.io/repos/github/PolymathNetwork/polymath-core/badge.svg?branch=master)](https://coveralls.io/github/PolymathNetwork/polymath-core?branch=master) [![Gitter](https://img.shields.io/badge/chat-gitter-green.svg)](https://gitter.im/PolymathNetwork/Lobby) [![Telegram](https://img.shields.io/badge/50k+-telegram-blue.svg)](https://gitter.im/PolymathNetwork/Lobby) From a89562c4823de31a38c709d7cb95436059ee73ce Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 20:55:37 +0530 Subject: [PATCH 17/18] env var changes --- scripts/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 2f4e5b057..f23df2845 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -91,11 +91,11 @@ fi if [ "$COVERAGE" = true ]; then curl -o node_modules/solidity-coverage/lib/app.js https://raw.githubusercontent.com/maxsam4/solidity-coverage/relative-path/lib/app.js node_modules/.bin/solidity-coverage - if [ "$CI" = true ]; then + if [ "$CIRCLECI" = true ]; then cat coverage/lcov.info | node_modules/.bin/coveralls fi else - if [ "$CI" = true ]; then + if [ "$CIRCLECI" = true ]; then mkdir test-results mkdir test-results/mocha rm truffle-config.js From 742cdad7ed98525402b04c1899d91405d968d67a Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 13 Dec 2018 21:01:27 +0530 Subject: [PATCH 18/18] comment --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index f23df2845..9f595d0ba 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -95,7 +95,7 @@ if [ "$COVERAGE" = true ]; then cat coverage/lcov.info | node_modules/.bin/coveralls fi else - if [ "$CIRCLECI" = true ]; then + if [ "$CIRCLECI" = true ]; then # using mocha junit reporter for parallelism in CircleCI mkdir test-results mkdir test-results/mocha rm truffle-config.js