mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-09 14:39:54 +02:00
travis: collapse commands into single instance to ensure exit on fail
Before this commit, if for example the linter failed, then we would go on to all the other tests rather than halting. We fix this by instead chaining the relevant commands, and eliminating the LINT env variable in the build matrix.
This commit is contained in:
parent
910757d30e
commit
ac04306dcf
11
.travis.yml
11
.travis.yml
@ -15,7 +15,7 @@ env:
|
|||||||
global:
|
global:
|
||||||
- GOCACHE=$HOME/.go-build
|
- GOCACHE=$HOME/.go-build
|
||||||
matrix:
|
matrix:
|
||||||
- RACE=true LINT=true
|
- RACE=true
|
||||||
- ITEST=true
|
- ITEST=true
|
||||||
- COVER=true
|
- COVER=true
|
||||||
|
|
||||||
@ -32,19 +32,14 @@ script:
|
|||||||
# Common for all builds.
|
# Common for all builds.
|
||||||
- make btcd
|
- make btcd
|
||||||
|
|
||||||
# Run linter if LINT=true.
|
|
||||||
- 'if [ "$LINT" = true ]; then make lint ; fi'
|
|
||||||
|
|
||||||
# Run unit tests with race condition detector.
|
# Run unit tests with race condition detector.
|
||||||
- 'if [ "$RACE" = true ]; then make unit-race ; fi'
|
- 'if [ "$RACE" = true ]; then make unit-race ; fi'
|
||||||
|
|
||||||
# Run integration tests.
|
# Run integration tests.
|
||||||
- 'if [ "$ITEST" = true ]; then make build ; fi'
|
- 'if [ "$ITEST" = true ]; then make build && make itest-only; fi'
|
||||||
- 'if [ "$ITEST" = true ]; then make itest-only ; fi'
|
|
||||||
|
|
||||||
# Run unit tests and generate coverage report.
|
# Run unit tests and generate coverage report.
|
||||||
- 'if [ "$COVER" = true ]; then make unit-cover; fi'
|
- 'if [ "$COVER" = true ]; then make lint && make unit-cover && make goveralls; fi'
|
||||||
- 'if [ "$COVER" = true ]; then make goveralls; fi'
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user