From fb6d35438f6dec1c96e753656fb897e3a25828f0 Mon Sep 17 00:00:00 2001 From: Nicolas Peugnet Date: Tue, 16 Jan 2024 18:14:10 +0100 Subject: Build and run unit tests in gitlab CI --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d5a6845 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,37 @@ +image: docker.io/quite/android-sdk-ndk:7 + +variables: + # get those pesky submodules + GIT_SUBMODULE_STRATEGY: recursive + +before_script: + - export GRADLE_USER_HOME=$(pwd)/.gradle + - chmod +x ./gradlew + +cache: + key: ${CI_PROJECT_ID} + paths: + - .gradle/ + +stages: + - build + +# lintDebug: +# stage: build +# script: +# - ./gradlew -Pci --console=plain -PbuildDir=lint :app:lintDebug + +testDebug: + stage: build + script: + # ANDROID_SDK_ROOT is already set in the android-sdk-ndk container image. + - pushd libs/humla-spongycastle + - ../../gradlew jar + - popd + - ./gradlew -Pci --console=plain testDebug + +# coverageTests: +# stage: test +# script: +# - ./gradlew -Pci --console=plain jacocoTestReport coveralls + -- cgit v1.2.3