Skip to content

Commit

Permalink
Avoid running unnecessary steps in travis deploy stage
Browse files Browse the repository at this point in the history
The build steps `before_install`, `install` and `before_script` should
only be run on actual tags. I moved the contents into shell scripts and
run them only conditionally in the `deploy` stage of travis.
  • Loading branch information
konradkonrad committed Aug 31, 2017
1 parent 2f95470 commit 61f4cb1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,13 @@ cache:
- "$HOME/.ethash"
- "$HOME/.bin"
before_install:
- mkdir -p $HOME/.bin
- export PATH=$PATH:$HOME/.bin
- "./.travis/download_geth.sh"
- "./.travis/download_solc.sh"
- mkdir -p $HOME/.bin
- export PATH=$PATH:$HOME/.bin
- ./.travis/before_install.sh
install:
- pip install -U pip wheel coveralls "coverage<4.4"
- pip install pytest-travis-fold
- pip install flake8
- pip install -r requirements-dev.txt
- pip install .
./.travis/install.sh
before_script:
- flake8 raiden/ tools/
- raiden smoketest
./.travis/before_script.sh
script:
- coverage run -m py.test --travis-fold=always -vvvvvv --log-config='raiden:DEBUG' --random $BLOCKCHAIN_TYPE ./raiden/tests/$TEST_TYPE
after_success:
Expand All @@ -52,6 +46,9 @@ notifications:
jobs:
include:
stage: deploy
before_install: if [ -n "$TRAVIS_TAG" ]; then mkdir -p $HOME/.bin; export PATH=$PATH:$HOME/.bin; ./.travis/before_install.sh; fi
install: if [ -n "$TRAVIS_TAG" ]; then . .travis/install.sh; fi
before_script: if [ -n "$TRAVIS_TAG" ]; then . .travis/before_script; fi
script: if [ -n "$TRAVIS_TAG" ]; then make bundle; fi
env: TEST_TYPE=""
deploy:
Expand Down
3 changes: 3 additions & 0 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
"./.travis/download_geth.sh"
"./.travis/download_solc.sh"
3 changes: 3 additions & 0 deletions .travis/before_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
flake8 raiden/ tools/
raiden smoketest
6 changes: 6 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
pip install -U pip wheel coveralls "coverage<4.4"
pip install pytest-travis-fold
pip install flake8
pip install -r requirements-dev.txt
pip install .

0 comments on commit 61f4cb1

Please sign in to comment.