forked from eiffel-community/eiffel-intelligence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 1.83 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
os: linux
dist: xenial
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
# Only running report_coverage (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: unitAndFunctionalTests
script:
- mvn test -DskipITs -Dsurefire.rerunFailingTestsCount=2 -Dspring.config.location=src/main/resources/application.properties -B
- stage: test
name: integrationTests
# To ensure docker containers are fully up and running we sleep 60s
before_script:
- source src/main/docker/env.bash
- docker-compose -f src/main/docker/docker-compose.yml up -d mongodb mongodb-auth rabbitmq eiffel-er jenkins mail-server
- sleep 60
script:
- mvn verify -DskipUTs -Djasypt.encryptor.password=integrationtest -Dspring.config.location=src/integrationtests/resources/application.properties -B
- stage: report_coverage
name: report_coverage
# Generating test coverage report and publishing to Codacy
script:
- mvn cobertura:cobertura -B
- 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
- java -jar codacy-coverage-reporter-assembly.jar report -l Java -r target/site/cobertura/coverage.xml