-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
643 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
dist: xenial | ||
language: node_js | ||
node_js: | ||
- "9" | ||
env: | ||
- NODE_ENV=development | ||
- NODE_ENV=development ARTIFACTS_DIR=$TRAVIS_BUILD_DIR/artifacts CUCUMBER_ARTIFACTS_DIR=$ARTIFACTS_DIR/cucumber | ||
sudo: enabled | ||
addons: | ||
apt: | ||
packages: | ||
- s3cmd | ||
before_script: | ||
- mkdir -p $ARTIFACTS_DIR | ||
- mkdir -p $CUCUMBER_ARTIFACTS_DIR | ||
- echo arangodb3 arangodb/password password root | sudo debconf-set-selections # set username 'root' | ||
- echo arangodb3 arangodb/password_again password root | sudo debconf-set-selections # set password 'root' | ||
- chmod +x setup_arangodb.sh | ||
|
@@ -13,34 +20,28 @@ before_script: | |
- cp .origintrail_noderc.travis .origintrail_noderc | ||
- npm run bootstrap | ||
- npm install -g [email protected] &> /dev/null | ||
- npm install -g [email protected] &> /dev/null | ||
- npm install -g [email protected] &> /dev/null | ||
script: | ||
- npm run lint | ||
- 'if [ "$TRAVIS_EVENT_TYPE" != "push" ]; then npm run test:bdd; fi' | ||
- if [ "$TRAVIS_EVENT_TYPE" != "push" ]; then | ||
npm run test:bdd:dryrun | ||
npm run test:bdd -- --world-parameters '{"appDataBaseDir":"$CUCUMBER_ARTIFACTS_DIR","keepFailedArtifacts":true}'; | ||
fi | ||
# checks for arangodb based solution | ||
- npm test 2> mocha-logs.log | ||
- npm start &>arangodb.log & | ||
- npm test 2> $ARTIFACTS_DIR/mocha-logs.log | ||
- npm start &> $ARTIFACTS_DIR/app-start.log & | ||
- sleep 10 | ||
- jobs | ||
- if [ -n "$(jobs -p)" ]; then kill %1; fi | ||
# compile and check Smart Contracts | ||
- ganache-cli -i 5777 -p 7545 -l 10000000 -m "aspect ask story desert profit engage tuition leave fade giraffe exclude brief" &>ganache.log & | ||
- ganache-cli -i 5777 -p 7545 -l 10000000 -m "aspect ask story desert profit engage tuition leave fade giraffe exclude brief" &> $ARTIFACTS_DIR/ganache.log & | ||
- cd modules/Blockchain/Ethereum | ||
- truffle test --network test > ../../../truffle-test.log | ||
- rm -rf build && truffle migrate --reset --compile-all --network ganache > ../../../truffle-migrate.log | ||
- cd ../../../ | ||
- truffle test --network test > $ARTIFACTS_DIR/truffle-test.log | ||
- rm -rf build && truffle migrate --reset --compile-all --network ganache > $ARTIFACTS_DIR/truffle-migrate.log | ||
- cd $TRAVIS_BUILD_DIR | ||
- jobs | ||
- kill %1 | ||
- kill -9 %1 | ||
after_script: | ||
- cat mocha-logs.log | ||
- rm -f mocha-logs.log | ||
- cat arangodb.log | ||
- rm -f arangodb.log | ||
- cat truffle-test.log | ||
- rm -f truffle-test.log | ||
- cat truffle-migrate.log | ||
- rm -f truffle-migrate.log | ||
# enable line bellow in case you are interested in reading ganache-cli logs | ||
# - cat ganache.log | ||
- rm -f ganache.log | ||
- s3cmd --acl-public put --recursive $ARTIFACTS_DIR/* s3://ot-travis-ci/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/ | ||
- echo "Uploaded to s3://ot-travis-ci/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/" | ||
- kill -9 $(pgrep arangod) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.