Created
January 6, 2021 14:27
-
-
Save alfonsojohan/0e3c47c23fae7284e8a5d48ae7199806 to your computer and use it in GitHub Desktop.
GitLab CI yaml for gradle with unit tests reports showing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: gradle:jdk15 | |
variables: | |
GRADLE_OPTS: "-Dorg.gradle.daemon=false" | |
before_script: | |
- export GRADLE_USER_HOME=`pwd`/.gradle | |
cache: | |
paths: | |
- .gradle/wrapper | |
- .gradle/caches | |
stages: | |
- build | |
- test | |
build: | |
stage: build | |
script: ./gradlew --build-cache assemble | |
cache: | |
key: "$CI_COMMIT_REF_NAME" | |
policy: push | |
paths: | |
- build | |
- .gradle | |
test: | |
stage: test | |
script: ./gradlew check | |
artifacts: | |
when: always | |
reports: | |
junit: build/test-results/test/**/TEST-*.xml | |
cache: | |
key: "$CI_COMMIT_REF_NAME" | |
policy: pull | |
paths: | |
- build | |
- .gradle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment