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 + diff --git a/.travis.yml b/.travis.yml index d0fb40bfc..b94c7e29d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,14 @@ language: node_js -cache: - directories: - - node_modules notifications: email: false node_js: - - '8' + - '10' +cache: + npm: false +before_install: + - sudo apt-get install -y netcat env: - - TASK=lint - - TASK=test - - TASK=coverage -before_script: - - npm prune + - TASK=test:gas:ci script: "npm run $TASK" after_success: - cat coverage/lcov.info | ./node_modules/.bin/coveralls 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..98fa9193b 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-alpha.2", "ethereumjs-abi": "^0.6.5", "ganache-cli": "^6.4.2", "mocha-lcov-reporter": "^1.3.0",