From 014120fdb22958420776837c9d563dd7f0f6b69c Mon Sep 17 00:00:00 2001 From: cgewecke Date: Sat, 27 Jul 2019 21:07:09 -0700 Subject: [PATCH 01/11] Add codechecks gas usage report to CI --- .travis.yml | 1 + codechecks.yml | 2 ++ package.json | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 codechecks.yml diff --git a/.travis.yml b/.travis.yml index d0fb40bfc..2f9deaded 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ env: - TASK=lint - TASK=test - TASK=coverage + - TASK=test:gas:ci before_script: - npm prune script: "npm run $TASK" diff --git a/codechecks.yml b/codechecks.yml new file mode 100644 index 000000000..8a630425b --- /dev/null +++ b/codechecks.yml @@ -0,0 +1,2 @@ +checks: + - name: eth-gas-reporter/codechecks diff --git a/package.json b/package.json index 5bea6fdc1..22ca2c406 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "compile": "truffle compile", "test": "TRUFFLE_TEST=true npm run ganache-cli:test", "test:gas": "GAS_REPORTER=true npm test", + "test:gas:ci": "GAS_REPORTER=true npm test && npx codechecks", "lint": "solium --dir ./contracts", "coverage": "SOLIDITY_COVERAGE=true npm run ganache-cli:test", "console": "truffle dev", @@ -33,9 +34,10 @@ "repository": "https://github.com/aragon/aragonOS", "license": "(GPL-3.0-or-later OR MIT)", "devDependencies": { + "@codechecks/client": "^0.1.5", "coveralls": "^2.13.3", "eth-ens-namehash": "^2.0.8", - "eth-gas-reporter": "^0.1.1", + "eth-gas-reporter": "^0.2.8", "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.4.2", "mocha-lcov-reporter": "^1.3.0", From 68b1235a42301c174e09057d1e689fe876faa38c Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 17:49:31 -0700 Subject: [PATCH 02/11] Run benchmark --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22ca2c406..e4912d4ce 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@codechecks/client": "^0.1.5", "coveralls": "^2.13.3", "eth-ens-namehash": "^2.0.8", - "eth-gas-reporter": "^0.2.8", + "eth-gas-reporter": "^0.2.8-alpha.0", "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.4.2", "mocha-lcov-reporter": "^1.3.0", From 6cab65e7a1d72fe91a75e66fc9c0a3714773b329 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 18:21:35 -0700 Subject: [PATCH 03/11] Benchmark II --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4912d4ce..07a4577ca 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@codechecks/client": "^0.1.5", "coveralls": "^2.13.3", "eth-ens-namehash": "^2.0.8", - "eth-gas-reporter": "^0.2.8-alpha.0", + "eth-gas-reporter": "^0.2.8-alpha.1", "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.4.2", "mocha-lcov-reporter": "^1.3.0", From 76b06fd29ece71d726b35f4e6d8ee996c6d55e55 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 21:14:40 -0700 Subject: [PATCH 04/11] Benchmark III --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07a4577ca..98fa9193b 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@codechecks/client": "^0.1.5", "coveralls": "^2.13.3", "eth-ens-namehash": "^2.0.8", - "eth-gas-reporter": "^0.2.8-alpha.1", + "eth-gas-reporter": "^0.2.8-alpha.2", "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.4.2", "mocha-lcov-reporter": "^1.3.0", From a3dc0f6bd83cf5e0355a3cafe2d2e5c57b457d2d Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 21:41:35 -0700 Subject: [PATCH 05/11] Try without modules cache --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f9deaded..1d38426e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,4 @@ language: node_js -cache: - directories: - - node_modules notifications: email: false node_js: From 37d655a071d5f613e8245277bac68ea640621d76 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 21:48:29 -0700 Subject: [PATCH 06/11] Force installation --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1d38426e9..2f280983c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ env: - TASK=coverage - TASK=test:gas:ci before_script: + - rm -rf node_modules + - npm install - npm prune script: "npm run $TASK" after_success: From fd2c9bdb05ff9e65c189b11db484dbe3462ea79e Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 21:57:00 -0700 Subject: [PATCH 07/11] Turn off npm cache --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f280983c..4a95ba1a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,14 @@ notifications: email: false node_js: - '8' +cache: + npm: false env: - TASK=lint - TASK=test - TASK=coverage - TASK=test:gas:ci before_script: - - rm -rf node_modules - - npm install - npm prune script: "npm run $TASK" after_success: From 5e5b1986894d05c0e12cda4b8bd9cc5b28702073 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 22:30:31 -0700 Subject: [PATCH 08/11] Try solo --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a95ba1a7..7cd7a06fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,10 @@ language: node_js notifications: email: false node_js: - - '8' + - '10' cache: npm: false env: - - TASK=lint - - TASK=test - - TASK=coverage - TASK=test:gas:ci before_script: - npm prune From d7eafd4dffead85fb7b8d1ea0014f7c1ee25ced8 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 22:35:49 -0700 Subject: [PATCH 09/11] No prune --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7cd7a06fa..f468d982b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,6 @@ cache: npm: false env: - TASK=test:gas:ci -before_script: - - npm prune script: "npm run $TASK" after_success: - cat coverage/lcov.info | ./node_modules/.bin/coveralls From 051cdf5106809596c313543abbe3c4c31b318daa Mon Sep 17 00:00:00 2001 From: cgewecke Date: Mon, 29 Jul 2019 22:56:27 -0700 Subject: [PATCH 10/11] Try installing netcat --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f468d982b..b94c7e29d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ node_js: - '10' cache: npm: false +before_install: + - sudo apt-get install -y netcat env: - TASK=test:gas:ci script: "npm run $TASK" From a5286d1f3c02410e421bf1d683712336255a4f7c Mon Sep 17 00:00:00 2001 From: cgewecke Date: Tue, 30 Jul 2019 10:41:02 -0700 Subject: [PATCH 11/11] Inspect run times on circleci --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..bbdeacdbd --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +version: 2.0 +jobs: + unit-test: + docker: + - image: circleci/node:10.12-stretch + steps: + - checkout + - run: + name: Delete any old node_modules + command: | + rm -rf node_modules/ + - run: + name: Install dependencies + command: | + npm install + - run: + name: Run tests + command: | + npm run test:gas + +workflows: + version: 2 + build: + jobs: + - unit-test +