-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 2.18 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
strategy:
matrix:
api-level: [ 30 ]
concurrency:
group: validation-${{ github.head_ref }}
cancel-in-progress: true
env:
GITHUB_PACKAGE_DOWNLOAD_USER: ${{ github.actor }}
GITHUB_PACKAGE_DOWNLOAD_KEY: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PACKAGE_UPLOAD_USER: ${{ github.actor }}
GITHUB_PACKAGE_UPLOAD_KEY: ${{ secrets.GITHUB_TOKEN }}
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: Version
run: ./gradlew --no-daemon --stacktrace versionInfo
- name: Build
run: ./gradlew --no-daemon --stacktrace build
- name: Run Android Device Tests
uses: reactivecircus/android-emulator-runner@v2
env:
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 120
with:
api-level: ${{ matrix.api-level }}
target: google_atd
arch: x86_64
profile: Nexus 5
avd-name: blueprint-${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot -noaudio -no-boot-anim -camera-back none
disable-animations: true
disk-size: 2048M
script: ./gradlew --no-daemon --stacktrace connectedCheck
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew --no-daemon --stacktrace testCodeCoverageReport sonarqube
- name: Publish Development Version
run: echo "TODO"