forked from eiffel-community/eiffel-commons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (34 loc) · 1.23 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
sudo: required
dist: xenial
language: java
env:
- JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
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
# Using default stage 'test' for all our test jobs, and only running deploy stage
# (after merge) to master branch
stages:
- test
- name: report_coverage
if: branch = master AND type != pull_request
# List of jobs to run, tied to specific stages
jobs:
include:
- stage: test
name: AllTests
before_script: skip
script:
- mvn test -B
- stage: report_coverage
name: report_coverage
# Generating test coverage report and publishing to Codacy
script:
- CODACY_COVERAGE_REPORTER_VERSION=6.0.2
- mvn cobertura:cobertura -B
- curl -Ls -o codacy-coverage-reporter-assembly.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/$CODACY_COVERAGE_REPORTER_VERSION/codacy-coverage-reporter-$CODACY_COVERAGE_REPORTER_VERSION-assembly.jar
- java -jar codacy-coverage-reporter-assembly.jar report -l Java -r target/site/cobertura/coverage.xml