diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..72a27328857165bc7f97ba529a1386996d770b6c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: openjdk:8-alpine + +stages: + - test + +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + - .gradle + +test: + stage: test + coverage: '/Total.*?([0-9]{1,3})%/' + before_script: + - apk add --no-cache grep + script: + - ./gradlew codeCoverageReport + # The actual output that will be parsed by the code coverage + - grep -oP "Total.*?%" build/reports/jacoco/html/index.html + only: + - merge_requests + - tags diff --git a/apps/ministreaming/java/test/junit/net/i2p/client/streaming/I2PSocketExceptionTest.java b/apps/ministreaming/java/test/junit/net/i2p/client/streaming/I2PSocketExceptionTest.java index 597dc1a1f67032b4b9e4df96fab8bec5aeb51590..404ddb5e218d52c62645ca1a2c2be1f29cf9b5c6 100644 --- a/apps/ministreaming/java/test/junit/net/i2p/client/streaming/I2PSocketExceptionTest.java +++ b/apps/ministreaming/java/test/junit/net/i2p/client/streaming/I2PSocketExceptionTest.java @@ -60,6 +60,6 @@ public class I2PSocketExceptionTest { public void testUnknownStatus() { I2PSocketException e = new I2PSocketException(255); assertThat(e.getStatus(), is(255)); - assertThat(e.getMessage(), is("Failure code: 255")); + assertThat(e.getMessage(), endsWith(": 255")); } }