forked from kiegroup/optaweb-vehicle-routing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (40 loc) · 1.58 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
git:
depth: false
jobs:
include:
- language: node_js
node_js:
- 8
# keep the npm cache around to speed up installs (see https://docs.npmjs.com/cli/ci)
cache:
directories:
- "$HOME/.npm"
- "$HOME/.sonar/cache"
- "$HOME/.sonar/native-sonar-scanner"
before_install:
- "cd optaweb-vehicle-routing-frontend"
# most important checks first
script:
- npm run build
- npm run coverage # test with coverage report
# check that git working tree is clean after running npm install
# the git command returns 1 and fails the build if there are any uncommitted changes
- npm install && git diff HEAD --exit-code
after_script: ./travis-sonarcloud.sh
- language: java
jdk: openjdk8
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.m2/wrapper"
- "$HOME/.sonar/cache"
before_install:
- "cd optaweb-vehicle-routing-backend"
# Change Travis install phase to only resolve dependencies needed to run the build.
# Otherwise it would run `mvn install`, which results in doing some Maven phases twice (validate, compile, jar, ...).
# https://docs.travis-ci.com/user/languages/java/#projects-using-maven
#
# We also want to avoid Maven's install phase to prevent from writing to ~/.m2/repository, which is cached.
install: ./mvnw dependency:go-offline -Pjacoco,sonar --show-version
# do not install to avoid dirtying the cache
script: ./mvnw verify -Pjacoco,sonar --show-version