Skip to content
Snippets Groups Projects
Commit a4316a87 authored by René Schöne's avatar René Schöne
Browse files

Enhance ci.

- Disable Gradle daemon
- Use cache for build and .gradle dirs
- Save test reports
parent 7a660dfa
No related branches found
No related tags found
1 merge request!1Fixing CI
Pipeline #2350 failed
...@@ -3,25 +3,40 @@ stages: ...@@ -3,25 +3,40 @@ stages:
- test - test
- report - report
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
TEST_REPORTS: "/builds/rschoene/eraser/eraser-base/build/reports/tests/test/"
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build: build:
image: gradle:jdk8 image: gradle:jdk8
stage: build stage: build
script: script:
- ./gradlew --console=plain assemble - ./gradlew --console=plain --build-cache assemble
retry: 2 cache:
when: on_success key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
test: test:
image: gradle:jdk8 image: gradle:jdk8
stage: test stage: test
script: script:
- ./gradlew --continue --console=plain test jacocoTestReport - ./gradlew --continue --console=plain check jacocoTestReport
retry: 2 cache:
when: on_success key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
artifacts: artifacts:
when: always when: always
# paths: paths:
# - $TEST_REPORTS - $TEST_REPORTS
# - $JACOCO_DATA1 # - $JACOCO_DATA1
# - $JACOCO_DATA2 # - $JACOCO_DATA2
...@@ -35,8 +50,13 @@ coverage: ...@@ -35,8 +50,13 @@ coverage:
- pip install --user untangle - pip install --user untangle
- python2 print-coverage.py - python2 print-coverage.py
coverage: "/Covered (\\d{1,3}\\.\\d{2}%) of instructions for all projects\\./" coverage: "/Covered (\\d{1,3}\\.\\d{2}%) of instructions for all projects\\./"
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
allow_failure: true allow_failure: true
when: on_success
artifacts: artifacts:
when: always when: always
# paths: # paths:
......
[![pipeline status](https://git-st.inf.tu-dresden.de/rschoene/eraser/badges/master/pipeline.svg)](https://git-st.inf.tu-dresden.de/rschoene/eraser/commits/master)
[![coverage report](https://git-st.inf.tu-dresden.de/rschoene/eraser/badges/master/coverage.svg)](https://git-st.inf.tu-dresden.de/rschoene/eraser/commits/master)
# ERASER - OpenLicht Knowledge Base # ERASER - OpenLicht Knowledge Base
## Overview ## Overview
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment