This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (71 loc) · 2.52 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
sudo: required
language: java
jdk:
- oraclejdk8
services:
- docker
install: true
stages:
- build
- integration tests
- name: docs
if: fork = false AND branch = master
- name: deploy
if: fork = false AND tag =~ ^hoopoe-profiler-
# template for caching the gradle
_cache_gradle: &_cache_gradle
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# template for integration tests for sql plugin
_sql_integration_tests: &_sql_integration_tests
script:
- ./gradlew hoopoe-sql-queries-plugin:clean hoopoe-sql-queries-plugin:integrationTests
<<: *_cache_gradle
jobs:
include:
- stage: build
before_install:
# codacy coverage
- sudo apt-get install jq
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url)
script:
- ./gradlew clean build
<<: *_cache_gradle
after_success:
# codecov coverage
- bash <(curl -s https://codecov.io/bash)
# codacy coverage
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r hoopoe-core-tests/build/reports/jacoco/test/jacocoTestReport.xml
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r hoopoe-sql-queries-plugin/build/reports/jacoco/test/jacocoTestReport.xml
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r hoopoe-classloader/build/reports/jacoco/test/jacocoTestReport.xml
- stage: integration tests
script:
- ./gradlew clean integrationTests
<<: *_cache_gradle
- <<: *_sql_integration_tests
env: ITEST_DB=postgres
- <<: *_sql_integration_tests
env: ITEST_DB=mysql
- stage: docs
language: ruby
rvm: 2.4.1
jdk:
cache: bundler
before_install:
# deploy keys for github pages
- openssl aes-256-cbc -K $encrypted_5a0f048e2914_key -iv $encrypted_5a0f048e2914_iv
-in .deploy_key.enc -out .deploy_key -d
- chmod 600 .deploy_key
# rvm for jekyll
- gem install jekyll bundler
script:
- cd ./docs/ && bundle && bundle exec rake deploy
- stage: deploy
script:
- ./gradlew bintrayUpload
<<: *_cache_gradle