Skip to content

Commit

Permalink
#9: combine ci & emulated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arburk committed Jan 7, 2024
1 parent 4b602f4 commit 968c185
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Android CI

on: [push]
on:
pull_request:
types:
- opened
- synchronize
- reopened
push:

jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-latest # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
env:
JAVA_TOOL_OPTIONS: -Xmx4g

steps:
- uses: actions/checkout@v4
- name: display action
run: echo trigger event=${{ github.event_name }}

- name: checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -25,6 +36,7 @@ jobs:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Gradle packages
uses: actions/cache@v3
with:
Expand All @@ -36,13 +48,17 @@ jobs:
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew clean build jacocoTestReport
run: ./gradlew clean build

- name: run supportedSdksGroupDebugAndroidTest
if: github.event_name == 'pull_request' # perform emulated tests only on PRs
run: ./gradlew supportedSdksGroupDebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulators.emulator.showKernelLogging=true --info

- name: Sonar checks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar
run: ./gradlew jacocoTestReport sonar

- name: Upload test results
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 968c185

Please sign in to comment.