Skip to content

Commit 0d769b9

Browse files
committed
ci(travis.yml): update travis to use maven
1 parent 6c4513c commit 0d769b9

File tree

1 file changed

+52
-27
lines changed

1 file changed

+52
-27
lines changed

.travis.yml

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,32 @@
1+
---
2+
language: java
13
dist: xenial
24
os: linux
5+
6+
jdk:
7+
- openjdk8
8+
9+
notifications:
10+
email: true
11+
312
branches:
413
except:
514
- gh-pages
15+
16+
cache:
17+
directories:
18+
- "$HOME/.m2"
19+
20+
env:
21+
global:
22+
- MVN_ARGS="--settings build/.travis.settings.xml"
23+
624
stages:
7-
- Build and test
8-
- Semantic release
9-
- Publish javadoc
10-
- Upload Archives
25+
- name: Build and test
26+
- name: Semantic-Release
27+
if: branch = main AND type = push AND fork = false
28+
- name: Publish-Release
29+
if: tag IS present
1130

1231
jobs:
1332
include:
@@ -16,40 +35,46 @@ jobs:
1635
language: java
1736
before_install:
1837
- .utility/decrypt-service-instance-apikeys.sh
38+
install:
39+
- curl -s https://codecov.io/bash > $HOME/codecov-bash.sh && chmod +x $HOME/codecov-bash.sh
1940
script:
20-
- ./gradlew checkstyleMain
21-
- ./gradlew checkstyleTest
22-
- travis_retry .utility/travis-run-tests.sh
41+
- build/setMavenVersion.sh
42+
- mvn verify -fae -DskipITs $MVN_ARGS
2343
after_success:
24-
- bash <(curl -s https://codecov.io/bash)+++++++
44+
- build/publishCodeCoverage.sh
2545

26-
- stage: Semantic release
27-
jdk: openjdk8
28-
language: java
29-
if: (branch = master OR branch = rc) AND type = push AND fork = false
30-
before_install:
31-
- pip install --user bumpversion
46+
- stage: Semantic-Release
47+
install:
48+
- sudo apt-get install python
3249
- nvm install 12
50+
- npm install -g npm@6.x
51+
- pip install --user bump2version
3352
- npm install @semantic-release/changelog
3453
- npm install @semantic-release/exec
3554
- npm install @semantic-release/git
55+
- npm install @semantic-release/github
3656
script:
3757
- npx semantic-release
58+
after_success:
59+
- echo "Semantic release has successfully created a new tagged-release"
3860

39-
- stage: Publish javadoc
61+
- stage: Publish-Release
4062
jdk: openjdk8
41-
language: java
42-
if: type = push AND fork = false
63+
name: Publish-Javadoc
64+
install: true
4365
script:
44-
- ./gradlew docs
45-
- .utility/push-javadoc-to-gh-pages.sh
66+
- build/setMavenVersion.sh
67+
- mvn clean javadoc:aggregate $MVN_ARGS
68+
- build/publishJavadoc.sh
69+
after_success:
70+
- echo "Javadocs successfully published to gh-pages!"
4671

47-
- stage: Upload Archives
48-
jdk: openjdk8
49-
language: java
50-
if: tag IS present
72+
- jdk: openjdk8
73+
name: Publish-To-Maven-Central
74+
install: true
5175
script:
52-
- .utility/deploy-travis-wrapper.sh
53-
54-
notifications:
55-
email: true
76+
- build/setupSigning.sh
77+
- build/setMavenVersion.sh
78+
- mvn deploy $MVN_ARGS -DskipTests -P central
79+
after_success:
80+
- echo "Maven artifacts successfully published to Maven Central!"

0 commit comments

Comments
 (0)