Changeset View
Changeset View
Standalone View
Standalone View
.gitlab-ci.yml
- This file was added.
stages: | |||||
- test | |||||
variables: | |||||
# Clone the API automatically | |||||
GIT_SUBMODULE_STRATEGY: recursive | |||||
# Move tool directories inside /cache/ so they are cached between jobs by the runner. | |||||
# This way, dependencies are only downloaded once. | |||||
GRADLE_USER_HOME: /cache/.gradle | |||||
PIP_DOWNLOAD_CACHE: /cache/pip | |||||
PIP_CACHE_DIR: /cache/pip-cache | |||||
cache: | |||||
paths: | |||||
- .gradle | |||||
key: v1 | |||||
# Run the clean task before any job, because this will detect if the cache is corrupted. | |||||
# If the cache is corrupted (ZipFile error), delete it. The next command will re-download it. | |||||
# The clean task was chosen here because there's nothing to do, so it only takes a few seconds | |||||
# and this step doesn't slow down the pipeline. | |||||
before_script: | |||||
- ./gradlew --no-daemon clean 2> >(grep ZipFile && rm -rf /cache/.gradle/wrapper/dists/*) | |||||
junit: | |||||
stage: test | |||||
image: clovisai/wildfyre-java:latest # The image created in src/test/Dockerfile | |||||
script: | |||||
- ./api.sh | |||||
- ./gradlew --no-daemon test | |||||
artifacts: | |||||
reports: | |||||
junit: build/test-results/test/TEST-*.xml | |||||
paths: | |||||
- build/reports/tests/test | |||||
static-analysis: | |||||
stage: test | |||||
image: clovisai/wildfyre-java:latest | |||||
script: | |||||
- ./gradlew --no-daemon findbugsMain findbugsTest | |||||
artifacts: | |||||
paths: | |||||
- build/reports/findbugs/main.html | |||||
- build/reports/findbugs/test.html | |||||
dokka: | |||||
stage: test | |||||
image: java:latest | |||||
script: | |||||
- ./gradlew --no-daemon dokka | |||||
artifacts: | |||||
paths: | |||||
- build/docs/dokka |