-
Notifications
You must be signed in to change notification settings - Fork 1.1k
35 lines (32 loc) · 1.23 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CI
on: [push, pull_request]
jobs:
build-and-test:
name: Build and run tests
runs-on: macos-latest
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=1g"
steps:
- name: Checkout current develop branch
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3.11.0
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Run unit/instrumentation tests and coverage generation
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
disable-animations: true
script: ./gradlew -Pandroid.testInstrumentationRunnerArguments.notAnnotation=androidx.test.filters.FlakyTest,androidx.test.filters.LargeTest jacocoTestReport --stacktrace
- name: SonarCloud static code and coverage analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonarqube -Dsonar.login="$SONAR_TOKEN"