forked from triplea-game/triplea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (78 loc) · 3.26 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
dist: xenial
sudo: false
language: java
if: tag is blank
# Note: Travis generally does not allocate more than 5 VMs at once.
# Avoid running more than 5 jobs in parallel. Try to keep the jobs
# balanced so that they each take about the same amount of time.
jobs:
include:
- stage: verify
env: DESCRIPTION="static verification"
jdk: openjdk11
install: skip
script:
## shellcheck all shell scripts
- find .travis/ -type f | xargs grep -lE "^#\!/bin/bash$" | xargs shellcheck
- ./gradlew --parallel validateYamls spotlessCheck checkstyleMain checkstyleTest pmdMain
- stage: verify
env: DESCRIPTION=integTest
jdk: openjdk11
addons: {postgresql: "10"}
install: skip
script:
- ./.travis/setup_database &
- ./.travis/launch_http_server
- ./gradlew integTest
- stage: verify
env: DESCRIPTION="JDK12 unitTests"
jdk: openjdk12
install: skip
script:
- ./gradlew --parallel test
- stage: verify
jdk: openjdk11
env: DESCRIPTION="JDK11 unitTests and Test Coverage"
install: skip
script:
- ./gradlew --parallel test jacocoTestReport
- bash <(curl -s https://codecov.io/bash) # upload coverage report - https://github.com/codecov/example-gradle
- stage: verify
jdk: openjdk11
env: DESCRIPTION="Smoke Test"
addons: {postgresql: "10"}
install: skip
script:
- ./.travis/setup_database
- ./.travis/run_smoke_tests
- stage: deploy
if: (branch = master) and (repo = 'triplea-game/triplea') and (type != 'pull_request')
install: skip
script:
- ./.travis/setup_gpg
## Update product version to include build number.
## EG: replace "2.0.0" to be "2.0.15555";
- sed -i "s/.0$/.$TRAVIS_BUILD_NUMBER/" game-core/src/main/resources/META-INF/triplea/product.properties
- ./.travis/do_release
deploy:
jdk: openjdk11
provider: releases
addons:
apt:
packages:
# python for map file splitter
- python3
- python3-yaml
api_key:
secure: nxaqYrkXLGL3W20/eCnf63DLjMrQAhEuW44jggh1/nI383goa+u6w0bBtWCxRdVzos7t4dpVfS6+kv6oIHacm9zVA+RYrqy5opzCJhq8lmXVVRijbALzUeiFif2HURMaKWj0ynRNVlAyBHzazPTLZVWywifpdSubSkuMWkl20cmuKu/Hg3c1EC9se3OYhhTHx3Hya7xSrctrDEYLsEBAUZzkKfscqRVqwwltS88CgIMtRISDpSBGrtH0t1uAH6NitTSguGgb+QEpqnELcRLymX2G1yzMA4Xr5c/L34MfbBKf8vIuG9t411xYuLoyKoUbroTWxSnPwlSy6PHz+QJ7UCXbDkATOGO3chxlKxglppvI/G3n2YP5Zf2dAaDlHblpvarh55i/4i4sKB2AbvvzkIHrQJwUgmLCbpN8/Vp9GWcGkd6i5U7F8tNInCs6ttX3oGvGOfYEXs02Ctyiea4LAqk4S7GZTuV2QXqxXglL4eRIwZ4UETiwgoAAtHma63Eq7+9t2ykMlk7zAK96FGwJrB97wa08aPuSxL94IYEBmn9Ht/vKXRiNQMvpnfp4rWQtL3cqbVyYAg5EjKb4PsBmnb91+RXtnWFOY1RpZGt8sPXYd+KZYzN1BXTFJEpaLLsIDN6r7nMcAvJDUmucaM+m7giPXz1ZBGAic3UBM1qMCgI=
file_glob: true
file: build/artifacts/*
skip_cleanup: true
prerelease: true
on:
tags: false
repo: triplea-game/triplea
branch: master
after_failure:
- echo "================ Build step 'after_failure' =================" > /dev/null
- test "$TRAVIS_EVENT_TYPE" != "pull_request" && test "$TRAVIS_BRANCH" = master && ./.travis/report_build_status FAILURE