-
Notifications
You must be signed in to change notification settings - Fork 15
/
.travis.yml
49 lines (41 loc) · 1.51 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
sudo: required
dist: trusty
language: java
services:
- docker
env:
- JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
# Run before every job
before_install:
- sudo apt-get update
- sudo apt-get install -y openjdk-8-jdk
- PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/lib\/jvm\/openjdk11\/bin//')
- java -version
- uname -a
- chmod +x pom.xml
stages:
- test
- name: report_coverage
# We can only run the coverage report due to security restrictions see
# https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
if: type != pull_request
jobs:
include:
- stage: test
name: unitAndFunctionalTests
script:
- mvn test
- stage: test
name: integrationTests
script:
- ./eiffel-gerrit-plugin-script build start
- mvn verify -DskipUTs
- stage: report_coverage
name: report_coverage
# Generating test coverage report and publishing to Codacy
script:
# Fetching converter for converting coverage report to Codacy format
- sudo apt-get install -y jq
- curl -LSs $(curl -LSs https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({content_type, browser_download_url} | select(.content_type | contains("application/octet-stream"))) | .[0].browser_download_url') -o codacy-coverage-reporter-assembly.jar
- mvn cobertura:cobertura -B
- java -jar codacy-coverage-reporter-assembly.jar report -l Java -r target/site/cobertura/coverage.xml