playtime/.gitlab-ci.yml

60 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2019-12-26 17:01:27 +01:00
image: openjdk:11
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
stages:
- compile
- test
- analyse
- build
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
- export GRADLE_USER_HOME=`pwd`/.gradle
2019-12-26 17:01:27 +01:00
cache:
paths:
- .gradle/wrapper
- .gradle/caches
complie:
stage: compile
script:
- "./gradlew $GRADLE_OPTS testClasses"
unit-test:
stage: test
script:
- "./gradlew $GRADLE_OPTS test"
- "cat build/reports/tests/test/index.html"
2019-12-29 04:37:12 +01:00
artifacts:
expire_in: 3 days
paths:
2020-02-08 22:54:28 +01:00
- build/reports/tests/test/
2019-12-29 04:37:12 +01:00
reports:
junit: build/test-results/test/TEST-*.xml
2019-12-26 17:01:27 +01:00
2020-02-08 22:54:28 +01:00
coverage:
stage: analyse
script:
- "./gradlew $GRADLE_OPTS clean jacocoTestReport"
- "cat build/reports/jacoco/test/html/index.html"
2019-12-26 17:01:27 +01:00
lint:
stage: analyse
script:
- "./gradlew $GRADLE_OPTS --continue ktlintCheck"
- "cat ./build/reports/ktlint/ktlintKotlinScriptCheck.txt"
build-tag-artefact:
stage: build
script:
- "./gradlew $GRADLE_OPTS shadowJar"
artifacts:
paths:
- build/libs/*-all.jar
only:
- tags