-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (52 loc) · 1.65 KB
/
ci-pull-request-validation.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI - Pull Request Validation
on:
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- main
- release/*
- feature/*
- bugfix/*
workflow_dispatch:
jobs:
pull-request-validation:
runs-on: macos-latest
concurrency:
group: validation-${{ github.head_ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Version
run: ./gradlew --stacktrace versionInfo
- name: Build
run: ./gradlew --stacktrace build
- name: Run Android instrumented tests
run: ./gradlew cleanManagedDevices --unused-only &&
./gradlew --stacktrace androidGroupDebugAndroidTest
-Dorg.gradle.workers.max=1
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
- name: Publish test report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
- name: Analyze
if: ${{ false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew --stacktrace :app-android:createDebugUnitTestCoverageReport sonar
- name: Publish Development Version
run: echo "TODO"