Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix solc-nightly job #1732

Merged
merged 7 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 6 additions & 109 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"prepack": "npm run build",
"release": "scripts/release/release.sh",
"version": "scripts/release/update-changelog-release-date.js && scripts/release/update-ethpm-version.js",
"test": "npm run compile && scripts/test.sh"
"test": "scripts/test.sh"
frangio marked this conversation as resolved.
Show resolved Hide resolved
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -60,6 +60,6 @@
"solhint": "^1.5.0",
"solidity-coverage": "github:rotcivegaf/solidity-coverage#5875f5b7bc74d447f3312c9c0e9fc7814b482477",
"solidity-docgen": "^0.2.0-alpha.0",
"truffle": "^5.0.0"
"truffle": "^5.0.14"
}
}
15 changes: 7 additions & 8 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ start_ganache() {
)

if [ "$SOLIDITY_COVERAGE" = true ]; then
node_modules/.bin/ganache-cli-coverage --emitFreeLogs true --allowUnlimitedContractSize true --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
npx ganache-cli-coverage --emitFreeLogs true --allowUnlimitedContractSize true --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
else
node_modules/.bin/ganache-cli --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
npx ganache-cli --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
fi

ganache_pid=$!
Expand All @@ -63,18 +63,17 @@ else
fi

if [ "$SOLC_NIGHTLY" = true ]; then
echo "Downloading solc nightly"
wget -q https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/bin/soljson-nightly.js -O /tmp/soljson.js && find . -name soljson.js -exec cp /tmp/soljson.js {} \;
docker pull ethereum/solc:nightly
nventuro marked this conversation as resolved.
Show resolved Hide resolved
fi

truffle version
npx truffle version

if [ "$SOLIDITY_COVERAGE" = true ]; then
node_modules/.bin/solidity-coverage
npx solidity-coverage

if [ "$CONTINUOUS_INTEGRATION" = true ]; then
cat coverage/lcov.info | node_modules/.bin/coveralls
cat coverage/lcov.info | npx coveralls
fi
else
node_modules/.bin/truffle test "$@"
npx truffle test "$@"
fi
15 changes: 12 additions & 3 deletions truffle-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
require('chai/register-should');

const solcStable = {
version: '0.5.7',
};

const solcNightly = {
version: 'nightly',
docker: true,
nventuro marked this conversation as resolved.
Show resolved Hide resolved
};

const useSolcNightly = process.env.SOLC_NIGHTLY === 'true';

module.exports = {
networks: {
development: {
Expand All @@ -17,8 +28,6 @@ module.exports = {
},

compilers: {
solc: {
version: '0.5.7',
},
solc: useSolcNightly ? solcNightly : solcStable,
},
};