forked from zalando/zally
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (66 loc) · 2.22 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
dist: trusty
sudo: required
language: java
jdk:
- oraclejdk8
go:
- 1.11.4
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
yarn: true
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
- node_modules
before_install:
- eval "$(GIMME_GO_VERSION=1.11.4 gimme)"
- sudo apt-get install jq
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/2.0.2/codacy-coverage-reporter-2.0.2-assembly.jar
install: true
script:
# Unit-test and build server
- cd server/
- ./gradlew --console=plain build --info
- cd ..
# Unit-test and build integration server
- cd github-integration/
- ./gradlew --console=plain build --info
- cd ..
# Launch local zally server
- cd server/
- ./gradlew --console=plain bootRun > /dev/null &
- echo $! > /tmp/zally_server.pid
- cd ..
# Wait until Spring Boot will start
- while ! echo "GET / HTTP/1.0\n" | nc localhost 8000; do sleep 1; done
# Test and build CLI
- cd cli/zally
- ./test.sh
- ./test.sh integration
- go build
- cd $TRAVIS_BUILD_DIR
# Kill Zally server instance
- kill -9 `cat /tmp/zally_server.pid`
# Unit-test web UI
- cd web-ui
- npm --version
- nvm install 10
- node --version
- yarn --version
- yarn install -q
- yarn test
- yarn build
- cd $TRAVIS_BUILD_DIR
after_success:
# Upload test code coverage report for Zally server to codacy
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r server/build/reports/jacoco/test/jacocoTestReport.xml
# Upload test code coverage report for Zally server to codecov
- bash <(curl -s https://codecov.io/bash) -f server/build/reports/jacoco/test/jacocoTestReport.xml
# Upload test code coverage report for Zally integration server
- bash <(curl -s https://codecov.io/bash) -f github-integration/build/reports/jacoco/test/jacocoTestReport.xml
# Upload test code coverage report for Zally CLI
- bash <(curl -s https://codecov.io/bash) -f cli/zally/coverage.txt -f $TRAVIS_BUILD_DIR/web-ui/target/coverage/lcov.info