* Sketch * Migrate all tests to test-env * Finish migration to test-env * Add config * Work on GSN tests * Migrate to newer test-env version and loader syntax * Add GSN setup * Finish test-env migration * Setup coverage using test-env * Migrate to npm package * Fix package.json * Add compile step to CI * Add comment on coverage setup * Remove dependency on @truffle/contract * Fix package-lock merge * Fix linter errors * Upgrade test-environment, depend locally on ganche-coverage * Improve coverage script * Improve sign.js API * Move accounts destructuring to describe block * Switch to prebuilt ethereumjs-vm package * Upgrade test-enviroment version * use workspace in circleci config * remove unnecessary npx
26 lines
626 B
Bash
Executable File
26 lines
626 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit -o pipefail
|
|
|
|
# Executes cleanup function at script exit.
|
|
trap cleanup EXIT
|
|
|
|
cleanup() {
|
|
# Delete the symlink created to the allFiredEvents file solidity-coverage creates
|
|
rm -f allFiredEvents
|
|
}
|
|
|
|
log() {
|
|
echo "$*" >&2
|
|
}
|
|
|
|
# The allFiredEvents file is created inside coverageEnv, but solidity-coverage
|
|
# expects it to be at the top level. We create a symlink to fix this
|
|
ln -s coverageEnv/allFiredEvents allFiredEvents
|
|
|
|
OZ_TEST_ENV_COVERAGE=true npx solidity-coverage || log "Test run failed"
|
|
|
|
if [ "$CI" = true ]; then
|
|
curl -s https://codecov.io/bash | bash -s -- -C "$CIRCLE_SHA1"
|
|
fi
|