Skip to content

Commit 293637e

Browse files
authored
coveralls (#797)
* coveralls * transition test * .solcover.js * tests * eslint ignore * update travis node v
1 parent bca112e commit 293637e

36 files changed

+5671
-749
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cache/
2+
coverage/

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ node_modules/
77
*.tgz
88
.vscode/
99
site/
10+
coverage/
11+
coverage.json
12+
.covera*
13+
cache/
1014
yarn*

.solcover.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
mocha: {
3+
enableTimeouts: false,
4+
grep: "@skip-on-coverage", // Find everything with this tag
5+
invert: true // Run the grep's inverse set.
6+
},
7+
skipFiles: ['test/']
8+
}

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dist: trusty
33
language: node_js
44

55
node_js:
6-
- "10.16.3"
6+
- "12.19.0"
77

88
before_install:
99

@@ -25,3 +25,8 @@ jobs:
2525
- stage: tests
2626
name: "JS Lint"
2727
script: npm run lint
28+
29+
- stage: coverage
30+
name: "Solidity Test Coverage"
31+
if: branch = master
32+
script: npm run coveralls

migrations/2_deploy_organization.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//this migration file is used only for testing purpose
2-
var constants = require('../test/constants');
2+
33
var Avatar = artifacts.require('./Avatar.sol');
44
var DaoCreator = artifacts.require('./DaoCreator.sol');
55
var GlobalConstraintRegistrar = artifacts.require('./GlobalConstraintRegistrar.sol');
@@ -34,20 +34,20 @@ var accounts;
3434
//Deploy test organization with the following schemes:
3535
//schemeRegistrar, upgradeScheme,globalConstraintRegistrar,simpleICO,contributionReward.
3636
module.exports = async function(deployer) {
37-
deployer.deploy(ControllerCreator, {gas: constants.ARC_GAS_LIMIT}).then(async function(){
38-
await deployer.deploy(DAOTracker, {gas: constants.ARC_GAS_LIMIT});
37+
deployer.deploy(ControllerCreator).then(async function(){
38+
await deployer.deploy(DAOTracker);
3939
var daoTracker = await DAOTracker.deployed();
4040
var controllerCreator = await ControllerCreator.deployed();
41-
await deployer.deploy(DaoCreator,controllerCreator.address,daoTracker.address, {gas: constants.ARC_GAS_LIMIT});
42-
var daoCreatorInst = await DaoCreator.deployed(controllerCreator.address,{gas: constants.ARC_GAS_LIMIT});
41+
await deployer.deploy(DaoCreator,controllerCreator.address,daoTracker.address);
42+
var daoCreatorInst = await DaoCreator.deployed(controllerCreator.address);
4343
// Create DAOstack:
4444

4545
await web3.eth.getAccounts(function(err,res) { accounts = res; });
4646
founders[0] = accounts[0];
4747
var returnedParams = await daoCreatorInst.forgeOrg(orgName, tokenName, tokenSymbol, founders,
48-
initTokenInWei, initRepInWei,cap,{gas: constants.ARC_GAS_LIMIT});
48+
initTokenInWei, initRepInWei,cap);
4949
var AvatarInst = await Avatar.at(returnedParams.logs[0].args._avatar);
50-
await deployer.deploy(AbsoluteVote,{gas: constants.ARC_GAS_LIMIT});
50+
await deployer.deploy(AbsoluteVote);
5151
// Deploy AbsoluteVote:
5252
var AbsoluteVoteInst = await AbsoluteVote.deployed();
5353
// Deploy SchemeRegistrar:

0 commit comments

Comments
 (0)