forked from eiffel-community/eiffel-intelligence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (58 loc) · 2.16 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
sudo: required
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 and deploy stage (after merge) to master branch
stages:
- test
- name: report_coverage
if: branch = master AND type != pull_request
- name: deploy
if: branch = master AND type != pull_request
# List of jobs to run, tied to specific stages
jobs:
include:
- stage: test
name: unitAndFunctionalTests
script:
- mvn -Dsurefire.rerunFailingTestsCount=2 test -DskipITs -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 rabbitmq eiffel-er jenkins mail-server
- sleep 60
script:
- mvn verify -DskipUTs -Der.url=http://localhost:8084/search/ -Drabbitmq.exchange.name=ei-exchange -Dspring.mail.host=localhost -Dspring.mail.port=1025 -Dwaitlist.fixedRateResend=1 -B
- stage: deploy
name: deployGitHubPages
script: skip # do not run default test scripts
install: skip # do not run default mvn install
# Generate site documentation using mvn site plugin
before_deploy:
- rm -rf docs
- mvn site -B
deploy:
provider: pages
skip_cleanup: true
github-token: $GITHUB_TOKEN
local_dir: docs/
- stage: report_coverage
name: report_coverage
# Generating test coverage report and publishing to Codacy
script:
- mvn cobertura:cobertura -B
- curl -Ls -o codacy-coverage-reporter-assembly.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/6.0.2/codacy-coverage-reporter-6.0.2-assembly.jar
- java -jar codacy-coverage-reporter-assembly.jar report -l Java -r target/site/cobertura/coverage.xml