-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from dappnode/v0.1.17
v0.1.17 Former-commit-id: 528d466
- Loading branch information
Showing
121 changed files
with
5,055 additions
and
1,129 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
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 |
---|---|---|
|
@@ -2,35 +2,99 @@ language: node_js | |
dist: trusty | ||
sudo: required | ||
|
||
# Test envs will overwrite defaults | ||
env: | ||
- DAPPNODE=rocks | ||
jobs: | ||
include: | ||
# In app tests | ||
############## | ||
- stage: test | ||
env: | ||
- IN_APP_TEST | ||
node_js: | ||
- "8.9.4" | ||
cache: | ||
directories: | ||
- build/src/node_modules | ||
install: | ||
# This is a dockerized application, the node app is in /build/src | ||
- cd ./build/src | ||
- npm install | ||
before_script: | ||
- npm run lint | ||
script: | ||
- npm test -- --coverage # Include coverage when running tests | ||
after_success: # Upload coverage reports | ||
- COVERALLS_REPO_TOKEN=$coveralls_repo_token npm run coveralls | ||
|
||
node_js: | ||
- "8.9.4" | ||
# integration tests | ||
################### | ||
- stage: test | ||
env: | ||
- INTEGRATION_TEST | ||
node_js: | ||
- "8.9.4" | ||
services: | ||
- docker | ||
before_script: | ||
- chmod +x test/before_install.sh | ||
- chmod +x test/test_integration.sh | ||
- test/before_install.sh | ||
script: | ||
- test/test_integration.sh | ||
|
||
sudo: required | ||
|
||
services: | ||
- docker | ||
|
||
before_install: | ||
- chmod +x test/before_install.sh | ||
- chmod +x test/test_integration.sh | ||
- test/before_install.sh | ||
# Test that it builds correctly | ||
############################### | ||
- stage: build test | ||
services: | ||
- docker | ||
script: | ||
- docker-compose -f "$(find . -maxdepth 1 -name "docker-compose*")" build | ||
|
||
cache: | ||
directories: | ||
- build/src/node_modules | ||
install: | ||
# This is a dockerized application, the node app is in /build/src | ||
- cd ./build/src | ||
- npm install | ||
before_script: | ||
- npm run lint | ||
script: | ||
- npm run test | ||
- cd ../.. | ||
- test/test_integration.sh | ||
after_success: | ||
- COVERALLS_REPO_TOKEN=$coveralls_repo_token npm run coverage | ||
# Deploy stage, all code below is common between DAppNode packages | ||
################################################################## | ||
- stage: release | ||
services: | ||
- docker | ||
script: skip | ||
node_js: lts/* | ||
before_deploy: | ||
# Run the dappnodesdk | ||
- travis_retry npm install -g @dappnode/dappnodesdk | ||
- export TRAVIS_TAG=$(IPFS_PROVIDER=ipfs.infura.io IPFS_PROTO=https PROVIDER=wss://mainnet.infura.io/ws dappnodesdk next patch) | ||
- echo "NEXT TRAVIS_TAG $TRAVIS_TAG" | ||
- IPFS_PROVIDER=ipfs.infura.io IPFS_PROTO=https PROVIDER=wss://mainnet.infura.io/ws SILENT=true dappnodesdk publish patch | ||
# Set up git user name | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "dappnode" | ||
# Correct origin to push new branch | ||
- git remote rm origin | ||
- git remote add origin https://user:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git | ||
# Check if the tag exists, if so delete it | ||
- if [ $(git tag -l "$TRAVIS_TAG") ]; then export DELETE_TAG=true ; fi | ||
- if [ $DELETE_TAG ]; then git push --delete origin $TRAVIS_TAG || echo "Error deleting tag from origin" ; fi | ||
- if [ $DELETE_TAG ]; then git tag --delete $TRAVIS_TAG || echo "Error deleting tag locally" ; fi | ||
# Tag this commit | ||
- git tag $TRAVIS_TAG | ||
# Return to master. | ||
- git checkout master | ||
deploy: | ||
provider: releases | ||
prerelease: true | ||
overwrite: true | ||
api_key: "$GITHUB_TOKEN" | ||
file_glob: true | ||
file: build_${TRAVIS_TAG}/* | ||
skip_cleanup: true | ||
name: "v$TRAVIS_TAG" | ||
body: "# Changelog" | ||
on: | ||
branch: master | ||
after_deploy: | ||
echo "Successfully released" | ||
# - export GIT_BRANCH="master" | ||
# - bash github_release_script.sh | ||
# - echo "FINAL AFTER RELEASE SCRIPT" | ||
# - echo "$(Date)" > a.text | ||
# - git add . | ||
# - git commit -m "message" | ||
# - git checkout -b "v0.1.15" | ||
# - git push origin "v0.1.15" |
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.