Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1932 from trufflesuite/travis-refactor
Browse files Browse the repository at this point in the history
Refactor Travis CI
  • Loading branch information
CruzMolina authored Apr 22, 2019
2 parents 74e994a + 88b16c0 commit c296dcf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ sudo: required
language: node_js

before_install:
- docker pull ethereum/client-go:latest
- docker pull ethereum/solc:0.4.22
- sudo add-apt-repository --yes ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install -y dpkg
- sudo apt-get install solc jq snapd
- export PATH=$PATH:/snap/bin
- sudo snap install vyper --beta --devmode
- sudo apt-get install -y dpkg solc
- npm list -g lerna --depth=0 || npm install -g lerna
- npm install -g yarn

Expand Down
2 changes: 1 addition & 1 deletion packages/truffle-contract/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set -o errexit
if [ "$GETH" == true ]; then
mocha --timeout 7000 --grep @geth --colors --exit $@
else
mocha --no-warnings --timeout 7000 --colors --exit $@
mocha --no-warnings --timeout 7000 --grep @geth --invert --colors --exit $@
fi
11 changes: 11 additions & 0 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,31 @@ run_geth() {

if [ "$INTEGRATION" = true ]; then

sudo apt-get install -y jq
lerna run --scope truffle test --stream

elif [ "$GETH" = true ]; then

sudo apt-get install -y jq
docker pull ethereum/client-go:latest
run_geth
lerna run --scope truffle test --stream -- --exit
lerna run --scope truffle-contract test --stream -- --exit

elif [ "$PACKAGES" = true ]; then

docker pull ethereum/solc:0.4.22
sudo apt-get install -y snapd
export PATH=$PATH:/snap/bin
sudo snap install vyper --beta --devmode
lerna run --scope truffle-* test --stream --concurrency=1

elif [ "$COVERAGE" = true ]; then

docker pull ethereum/solc:0.4.22
sudo apt-get install -y jq snapd
export PATH=$PATH:/snap/bin
sudo snap install vyper --beta --devmode
cd packages/truffle-debugger && npm run test:coverage && \
cd ../../ && nyc lerna run --ignore truffle-debugger test && \
cat ./packages/truffle-debugger/coverage/lcov.info >> ./coverage/lcov.info && \
Expand Down

0 comments on commit c296dcf

Please sign in to comment.