forked from kiegroup/optaweb-vehicle-routing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (37 loc) · 1.33 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
git:
depth: false
language: java
jobs:
include:
- jdk: openjdk8
env:
- SONAR_SKIP=true
- jdk: openjdk11
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/.npm"
- "$HOME/.sonar/cache"
- "$HOME/.sonar/native-sonar-scanner"
- "$HOME/optaweb-vehicle-routing/optaweb-vehicle-routing-frontend/node"
# Download dependencies in quiet mode to avoid exceeding maximum log length.
install: >
mvn de.qaware.maven:go-offline-maven-plugin:1.2.3:resolve-dependencies
-DfailOnErrors -DdownloadSources=false
-Prun-code-coverage,sonarcloud-analysis
--quiet
before_script:
# Fail the build if the Red Hat package registry is referenced from package-lock.json.
- '! grep "\"resolved\".*\.redhat\.com" optaweb-vehicle-routing-frontend/package-lock.json'
script:
- mvn clean install -Prun-code-coverage,integration-tests --show-version
- mvn sonar:sonar -Psonarcloud-analysis -Dsonar.skip=$SONAR_SKIP
# Check that Git working tree is clean after running npm install via a frontend-maven-plugin.
# The `git` command returns 1 and fails the build if there are any uncommitted changes.
- git diff HEAD --exit-code
# Sanity-check distribution assembly.
- >
cd optaweb-vehicle-routing-distribution/target
&& unzip -q *.zip
&& cd optaweb-vehicle-routing-distribution-*/sources
&& mvn validate