forked from dockstore/dockstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (70 loc) · 3.53 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
services:
- docker
- postgresql
addons:
postgresql: "11"
branches:
except:
- /^feature.*$/
cache:
directories:
- /tmp/localstack_install_dir
- $HOME/.cache/pip
- $HOME/.m2/repository
- $HOME/apache-maven-3.6.2
os: linux
dist: bionic
language: java
jdk: openjdk12
jobs:
include:
- stage: coverage
script: mvn -B org.jacoco:jacoco-maven-plugin:report org.jacoco:jacoco-maven-plugin:report-aggregate clean install -P$TESTING_PROFILE,coverage -ntp
env:
- TESTING_PROFILE=require-cwltool-tests
# not feeling the bang-for-the-buck for these, running only in release branch
# - stage: coverage
# script: mvn --batch-mode clean install org.jacoco:jacoco-maven-plugin:report-integration org.jacoco:jacoco-maven-plugin:report-aggregate -P$TESTING_PROFILE,coverage -DskipClientITs=true
# if: branch = master OR branch =~ /^release.*$/
# env:
# - TESTING_PROFILE=toil-integration-tests
# build lifecycle is before_install, install, before_script, script, before_cache, after_success/after_failure, after_script
before_install:
- export M2_HOME=$HOME/apache-maven-3.6.2
- if [ ! -d $M2_HOME/bin ]; then curl https://archive.apache.org/dist/maven/maven-3/3.6.2/binaries/apache-maven-3.6.2-bin.tar.gz | tar zxf - -C $HOME; fi
- export PATH=$M2_HOME/bin:$PATH
# see https://www.deps.co/guides/travis-ci-latest-java/
- if [ -e $JAVA_HOME/lib/security/cacerts ]; then sudo rm $JAVA_HOME/lib/security/cacerts && sudo ln -s /etc/ssl/certs/java/cacerts $JAVA_HOME/lib/security/cacerts; fi
# need to clear out old version of the plugin till everything is merged due to https://github.com/maven-download-plugin/maven-download-plugin/issues/80
- rm -Rf $HOME/.m2/repository/.cache/download-maven-plugin/
# decrypt migration before initial build
- scripts/decrypt.sh
# turn this back on with updates to swagger (particularly swagger-maven-plugin), current implementation is too non-deterministic
#- scripts/check-swagger.sh
- wget --user DockstoreTestUser --password $DOCKSTORE_TEST_ACCESS_TOKEN --no-verbose -O git-secrets-1.3.0.tar.gz https://github.com/awslabs/git-secrets/archive/1.3.0.tar.gz
- tar -zxf git-secrets-1.3.0.tar.gz
- cd git-secrets-1.3.0
- sudo make install
- cd ../
# codacy hookup https://docs.codacy.com/coverage-reporter/alternative-ways-of-running-coverage-reporter/
- sudo apt-get install jq
- curl -u DockstoreTestUser:$DOCKSTORE_TEST_ACCESS_TOKEN -LSs "$(curl -u DockstoreTestUser:$DOCKSTORE_TEST_ACCESS_TOKEN -LSs https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({name, browser_download_url} | select(.name | endswith(".jar"))) | .[0].browser_download_url')" -o codacy-coverage-reporter-assembly.jar
- pyenv global 3.6.10
install:
- docker version
- scripts/install-tests.sh
before_script:
- psql -c "create user dockstore with password 'dockstore' createdb;" -U postgres
- psql -c 'create database webservice_test with owner = dockstore;' -U postgres
- export PATH=$PATH:$PWD/dockstore-client/target
# debug by double checking versions of stuff
- mvn -version
- echo $JAVA_HOME
before_cache:
- rm -rf /home/travis/.m2/repository/io/dockstore
- rm -rf $HOME/.m2/repository/.cache/download-maven-plugin directory
after_success:
- bash <(curl -s https://codecov.io/bash) -F ${TESTING_PROFILE//-} || echo "Codecov did not collect coverage reports"
- java -jar codacy-coverage-reporter-assembly.jar report -l Java -r reports/target/site/jacoco-aggregate/jacoco.xml
notifications:
webhooks: https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN