Skip to content

Commit

Permalink
Closes inspectIT#80 - Upload test reports after failures on TravisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusoe committed Jan 22, 2019
1 parent 01b33e0 commit d0814c6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .travis.yml
Expand Up @@ -6,6 +6,12 @@ jdk:
- oraclejdk11
- openjdk8

addons:
snaps:
- name: aws-cli
classic: true
channel: latest/edge

#enable caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -18,12 +24,20 @@ cache:
- $HOME/ibm-jdk-installer/

install: true
script:
- ./gradlew test systemTest
script: ./gradlew test systemTest

after_failure:
- if [ "${TRAVIS_REPO_SLUG}" = "mariusoe/inspectit-oce" ]; then aws s3 cp $TRAVIS_BUILD_DIR/inspectit-oce-agent/build/reports/tests/ s3://inspectit-oce-files/test-reports/$TRAVIS_BUILD_ID/agent/ --recursive; fi
- if [ "${TRAVIS_REPO_SLUG}" = "mariusoe/inspectit-oce" ]; then aws s3 cp $TRAVIS_BUILD_DIR/inspectit-oce-core/build/reports/tests/ s3://inspectit-oce-files/test-reports/$TRAVIS_BUILD_ID/core/ --recursive; fi

jobs:
include:
- name: "JDK ibmjdk8 Java"
addons:
snaps:
- name: aws-cli
classic: true
channel: latest/edge
sudo: true
install:
- wget -nc -O $HOME/ibm-jdk-installer/ibm-sdk.bin https://s3-eu-west-1.amazonaws.com/inspectit-oce-files/ibm-java-sdk-8.0-5.26-x86_64-archive.bin || true
Expand All @@ -39,7 +53,10 @@ jobs:
- sudo update-alternatives --set "javac" "$HOME/ibm-jdk-8/bin/javac"
- export JAVA_HOME=$HOME/ibm-jdk-8
- java -version
script: ./gradlew :inspectit-oce-agent:systemTest
script: ./gradlew test systemTest
after_failure:
- if [ "${TRAVIS_REPO_SLUG}" = "mariusoe/inspectit-oce" ]; then aws s3 cp $TRAVIS_BUILD_DIR/inspectit-oce-agent/build/reports/tests/ s3://inspectit-oce-files/test-reports/$TRAVIS_BUILD_ID/agent/ --recursive; fi
- if [ "${TRAVIS_REPO_SLUG}" = "mariusoe/inspectit-oce" ]; then aws s3 cp $TRAVIS_BUILD_DIR/inspectit-oce-core/build/reports/tests/ s3://inspectit-oce-files/test-reports/$TRAVIS_BUILD_ID/core/ --recursive; fi

- stage: deploy
name: "Code Coverage Reporting"
Expand Down
Expand Up @@ -19,5 +19,7 @@ public class FallbackConfigTest extends SpringTestBase {
public void testFallbackConfigurationActive() {
assertThat(env.getCurrentConfig().getThreadPoolSize()).isEqualTo(2);
assertThat(env.getCurrentConfig().getMetrics().isEnabled()).isFalse();

assertThat(false).isTrue();
}
}

0 comments on commit d0814c6

Please sign in to comment.