File: .travis.yml

package info (click to toggle)
mockito 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 5,644 kB
  • sloc: java: 44,519; xml: 48; makefile: 4
file content (62 lines) | stat: -rw-r--r-- 2,413 bytes parent folder | download
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
# More details on how to configure the Travis build
# https://docs.travis-ci.com/user/customizing-the-build/

# Speed up build by leveraging travis caches
cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

# Enabling container based infrastructure hoping it will help the build speed <= this didn't work well, so it's reverted
# see https://docs.travis-ci.com/user/migrating-from-legacy/ and https://docs.travis-ci.com/user/ci-environment
sudo: true

language: java

matrix:
  include:
  - jdk: oraclejdk8
  - jdk: oraclejdk8
    env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline
  - jdk: oraclejdk9
    env: SKIP_RELEASE=true
  - jdk: oraclejdk9
    env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline
  - jdk: oraclejdk9
    env: SKIP_RELEASE=true SIMULATE_JAVA11=true
  - install: . ./install-jdk.sh -F 10 -L GPL
    env: SKIP_RELEASE=true JDK='Oracle JDK 10'
  - install: . ./install-jdk.sh -F 10 -L GPL
    env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline JDK='Oracle JDK 10'
  - install: . ./install-jdk.sh -F 11 -L BCL
    env: SKIP_RELEASE=true JDK='Oracle JDK 11'
  - install: . ./install-jdk.sh -F 11 -L BCL
    env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline JDK='Oracle JDK 11'
  allow_failures:
    - env: SKIP_RELEASE=true JDK='Oracle JDK 11'
    - env: SKIP_RELEASE=true MOCK_MAKER=mock-maker-inline JDK='Oracle JDK 11'

branches:
  #Don't build tags
  except:
  - /^v\d/

before_install:
  - wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh

#Below skips the installation step completely (https://docs.travis-ci.com/user/customizing-the-build/#Skipping-the-Installation-Step)
#We need it because otherwise Travis CI injects an awkward './gradlew assemble' step into the CI workflow
#We want to control and decide what Gradle tasks are executed
install:
 - true

script:
  # We are using && below on purpose
  # ciPerformRelease must run only when the entire build has completed
  # This guarantees that no release steps are executed when the build or tests fail
  - ./gradlew build idea -s -PcheckJavaCompatibility && ./gradlew ciPerformRelease

after_success:
  #Generates coverage report:
  - ./gradlew --stacktrace coverageReport && cp build/reports/jacoco/mockitoCoverage/mockitoCoverage.xml jacoco.xml || echo "Code coverage failed"
  - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"