-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
58 lines (42 loc) · 1.42 KB
/
.travis.yml
File metadata and controls
58 lines (42 loc) · 1.42 KB
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
################################### JAVA SETUP ######################################
language: java
jdk:
- oraclejdk8
sudo: false # faster builds
notifications:
email: false
################################### GRADLE SETUP ######################################
env:
global:
- COVERALLS_REPO_TOKEN=$COVERALLS_TOKEN
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_install:
- chmod +x gradlew
################################ POST SUCCESSFUL BUILD ################################
######## RUN CODE COVERAGE ########
before_script:
- chmod +x gradlew
after_success:
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
- ./gradlew jacocoTestReport coveralls
################################## DEPLOYMENT STEPS ###################################
before_deploy:
- test $TRAVIS_TEST_RESULT = 0
- echo "tag detected as $TRAVIS_TAG"
- ./gradlew assemble -PprodVersion=$TRAVIS_TAG
- export RELEASE_DIR="build/libs"
- export RELEASE_PKG_FILE=$RELEASE_DIR/CrateRobot-$TRAVIS_TAG.jar
- echo "deploying $RELEASE_PKG_FILE to GitHub releases"
deploy:
provider: releases
api_key: "$GH_TOKEN"
skip_cleanup: true
file: "$TRAVIS_BUILD_DIR/$RELEASE_PKG_FILE"
on:
tags: true