From ab2e855f26b03a6cc00a7fe9610ae1b731f00627 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 23 Feb 2023 16:46:57 +0100 Subject: [PATCH] add job to check whether database schema needs updating, closes #2493 --- .gitlab-ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7e4ac5f7..36b499c20 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,6 +85,18 @@ errorprone: - cat config/errorprone.gradle >> app/build.gradle - ./gradlew -Dorg.gradle.dependency.verification=lenient assembleDebug +database schema: + stage: test + image: debian:bullseye-backports + script: + - apt-get update + - apt-get -qy --no-install-recommends install default-jdk-headless git sdkmanager + - export ANDROID_HOME=/opt/android-sdk + - export ANDROID_COMPILE_SDK=`sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' app/build.gradle` + - sdkmanager "platforms;android-$ANDROID_COMPILE_SDK" "build-tools;30.0.3" + - ./gradlew :libs:database:kaptDebugKotlin + - git --no-pager diff --exit-code + # Run the tests in the emulator. Each step is broken out to run on # its own since the CI runner can have limited RAM, and the emulator # can take a while to start.