From 805c8be91499b0e1a2dbeaa5f3e41951502b5de7 Mon Sep 17 00:00:00 2001 From: Ephraim Kigamba Date: Mon, 24 May 2021 14:12:25 +0300 Subject: [PATCH] Add Github actions CI --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ed59440c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Android CI with Gradle + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + unit_tests: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Print Java version + run: java -version + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Clean project + run: ./gradlew clean --stacktrace + - name: Build project skipping tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 22 + script: ./gradlew build -x test --stacktrace + - name: Run jacocoTestReport for each module + run: ./gradlew jacocoTestReport --stacktrace + - name: Merge jacoco reports from all modules + run: ./gradlew jacocoFullReport --stacktrace + - name: Upload coverage to Coveralls with Gradle + run: ./gradlew coveralls --stacktrace \ No newline at end of file