[MIT-1510] Coverage report #385
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build and test the 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 | |
on: [pull_request] | |
jobs: | |
# build: | |
# name: Build project | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# - name: Set up JDK 11 | |
# uses: actions/setup-java@v3 | |
# with: | |
# distribution: 'temurin' | |
# java-version: '11' | |
# - name: Build project | |
# run: ./gradlew sdk:build -x test | |
# env: | |
# PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }} | |
# PGP_SIGNING_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }} | |
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
test: | |
name: Unit test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Run unit tests | |
run: | | |
./gradlew sdk:testProductionDebugUnitTest | |
- name: Run instrumented test | |
uses: reactivecircus/[email protected] | |
with: | |
api-level: 31 | |
profile: Nexus 6 | |
arch: arm64-v8a | |
force-avd-creation: false | |
avd-name: macOS-avd-arm64-v8a-31 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew sdk:connectedProductionDebugAndroidTest | |
- name: Lint check | |
run: ./gradlew sdk:lint | |
- name: Create coverage report | |
uses: reactivecircus/[email protected] | |
with: | |
api-level: 31 | |
profile: Nexus 6 | |
arch: arm64-v8a | |
force-avd-creation: false | |
avd-name: macOS-avd-arm64-v8a-31 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew sdk:createProductionDebugCoverageReport | |
# env: | |
# PGP_SIGNING_KEY: ${{ secrets.PGP_SIGNING_KEY }} | |
# PGP_SIGNING_PASSWORD: ${{ secrets.PGP_SIGNING_PASSWORD }} | |
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
- name: Upload test report | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-report | |
path: sdk/build/reports | |
- name: Sonarcloud | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./gradlew sdk:sonar |