From d1e079b5fdf1717accbee5546f1238de22cfe895 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 26 Jan 2020 09:11:13 +0100 Subject: [PATCH] CI --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..78c7c27 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +image: hatsoftwares/mastalab-ci:latest + +before_script: + - export ANDROID_HOME=/opt/android-sdk-linux + - export PATH=$PATH:/opt/android-sdk-linux/platform-tools/ + - chmod +x gradlew + +stages: + - build-and-test + - tag + - toot + +.no-upload: &no-upload + stage: build-and-test + retry: 2 + +assembleDebug: + <<: *no-upload + cache: + key: "${CI_COMMIT_TAG}" + paths: + - app/build/outputs/apk/debug/app-debug.apk + policy: push + script: + - ./gradlew assembleDebug + +lintDebug: + <<: *no-upload + script: + - ./gradlew -Pci --console=plain :app:lint -PbuildDir=lint + except: + - tags + +debugTests: + <<: *no-upload + script: + - ./gradlew -Pci --console=plain :app:test + except: + - tags + + +