From 0471ce5252bf4da92327f85f91fb7751d8a5587c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 20 Aug 2018 12:00:32 +0200 Subject: [PATCH 1/4] Add gitlab-ci.yml --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..5bbb63261 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,28 @@ +image: circleci/android:api-27-alpha + +before_script: + - export GRADLE_USER_HOME="$(pwd)/.gradle" + - export GRADLE_OPTS='-Dorg.gradle.daemon=false' + +cache: + paths: + - .gradle + +stages: + - build + +build: + stage: build + script: + - ./gradlew assembleCiDebug + - ./gradlew testCiDebugUnitTest + - ./gradlew jacocoTestReportCiDebug + - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions, "% covered" }' Calendula/build/reports/jacoco/ciDebug/jacoco.csv + - if grep -r '* Created by' Calendula/src/; then exit 1; fi + artifacts: + paths: + - Calendula/build/outputs/ + - Calendula/build/reports/tests/ + - Calendula/build/test-results/ + - Calendula/build/reports/jacoco/ + expire_in: 1 week From 1397e564ff718300e52afda88619cd104ec0a5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 20 Aug 2018 12:02:01 +0200 Subject: [PATCH 2/4] Delete circle.yml. We now use Gitlab CI --- circle.yml | 60 ------------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 circle.yml diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 0964920e6..000000000 --- a/circle.yml +++ /dev/null @@ -1,60 +0,0 @@ -version: 2 -jobs: - build: - working_directory: ~/code - docker: - - image: circleci/android:api-25-alpha - environment: - JAVA_OPTS: "-Xms512m -Xmx2048m" - GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' - steps: - - checkout - - restore_cache: - key: jars-{{ checksum "build.gradle" }}-{{ checksum "Calendula/build.gradle" }} -# - run: -# name: Install AVD -# command: | -# sdkmanager "system-images;android-25;google_apis;armeabi-v7a" -# echo no | avdmanager create avd --name test -k "system-images;android-25;google_apis;armeabi-v7a" - - run: - name: Download Dependencies - command: ./gradlew androidDependencies - - save_cache: - paths: - - ~/.gradle - key: jars-{{ checksum "build.gradle" }}-{{ checksum "Calendula/build.gradle" }} - - run: - name: Build - command: ./gradlew assembleCiDebug - - run: - name: Run Unit Tests - command: ./gradlew testCiDebugUnitTest - - store_artifacts: - path: Calendula/build/reports/ - destination: reports - - store_test_results: - path: Calendula/build/test-results -# - run: -# name: Launch Android Emulator -# command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel on -# background: true -# - run: -# name: Wait For Emulator Bootup -# command: | -# circle-android wait-for-boot -# sleep 15 -# adb shell input keyevent 82 -# - run: -# name: Run Integration Tests -# command: ./gradlew connectedCiDebugAndroidTest --no-daemon -# - run: -# name: Generate Coverage Report -# command: ./gradlew jacocoTestReportCiDebug --no-daemon -# - store_artifacts: -# path: Calendula/build/reports/ -# destination: reports -# - run: -# name: Report coverage -# command: | -# wget 'https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/2.0.2/codacy-coverage-reporter-2.0.2-assembly.jar' -O coverage-reporter.jar -# java -cp coverage-reporter.jar com.codacy.CodacyCoverageReporter -l Java -r Calendula/build/reports/jacoco/ciDebug/jacoco.xml From d826832ceeb6bfa91ee3758626459a4dd53c9c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 20 Aug 2018 12:19:17 +0200 Subject: [PATCH 3/4] README: use gitlab CI badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73707c9a2..f4398cedd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![](https://tec.citius.usc.es/calendula/github-assets/calendula_promo_google_play.png) -# Calendula [![CircleCI](https://circleci.com/gh/citiususc/calendula/tree/develop.svg?style=shield)](https://circleci.com/gh/citiususc/calendula/tree/develop) +# Calendula [![CircleCI](https://gitlab.com/calendula-ci/calendula/badges/develop/build.svg)](https://gitlab.com/calendula-ci/calendula/pipelines) Calendula is an Android assistant for personal medication management, aimed at those who have trouble following their medication regimen, forget to take their drugs, or have complex schedules that are difficult to remember. From dea7c848c35b2692ec4492c8093636f4efa76d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Mon, 20 Aug 2018 12:31:12 +0200 Subject: [PATCH 4/4] README: Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4398cedd..8a63dde9b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ![](https://tec.citius.usc.es/calendula/github-assets/calendula_promo_google_play.png) -# Calendula [![CircleCI](https://gitlab.com/calendula-ci/calendula/badges/develop/build.svg)](https://gitlab.com/calendula-ci/calendula/pipelines) +# Calendula [![Gitlab CI](https://gitlab.com/calendula-ci/calendula/badges/develop/build.svg)](https://gitlab.com/calendula-ci/calendula/pipelines) Calendula is an Android assistant for personal medication management, aimed at those who have trouble following their medication regimen, forget to take their drugs, or have complex schedules that are difficult to remember.