Skip to content

Commit 83ce1b9

Browse files
committed
Change CI workflows to use Gradle managed devices
1 parent 8548506 commit 83ce1b9

File tree

3 files changed

+66
-89
lines changed

3 files changed

+66
-89
lines changed

.github/workflows/ci-build-snapshot-version.yml

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ jobs:
1212

1313
runs-on: macos-latest
1414

15-
strategy:
16-
matrix:
17-
api-level: [ 30 ]
18-
19-
env:
20-
GITHUB_PACKAGE_DOWNLOAD_USER: ${{ secrets.GH_PACKAGE_DOWNLOAD_USER }}
21-
GITHUB_PACKAGE_DOWNLOAD_KEY: ${{ secrets.GH_PACKAGE_DOWNLOAD_KEY }}
22-
GITHUB_PACKAGE_UPLOAD_USER: ${{ secrets.GH_PACKAGE_UPLOAD_USER }}
23-
GITHUB_PACKAGE_UPLOAD_KEY: ${{ secrets.GH_PACKAGE_UPLOAD_KEY }}
24-
2515
steps:
2616
- uses: actions/checkout@v3
2717
with:
@@ -30,47 +20,52 @@ jobs:
3020
- name: Setup Java
3121
uses: actions/setup-java@v3
3222
with:
33-
distribution: 'temurin'
34-
java-version: '11'
23+
distribution: temurin
24+
java-version: 11
25+
26+
- name: Set up Python 3.9
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: '3.9'
3530

3631
- name: Setup Android SDK
37-
uses: bitfunk/setup-android@v1.0.0
32+
uses: android-actions/setup-android@v2
3833

3934
- name: Setup Xcode
40-
uses: bitfunk/setup-xcode@v1.0.0
35+
uses: maxim-lobanov/setup-xcode@v1
4136
with:
4237
xcode-version: latest-stable
4338

4439
- name: Version
45-
run: ./gradlew --no-daemon --stacktrace versionInfo
40+
run: ./gradlew --stacktrace versionInfo
4641

4742
- name: Build
48-
run: ./gradlew --no-daemon --stacktrace build
43+
run: ./gradlew --stacktrace build
44+
45+
- name: Run Android instrumented tests
46+
run: ./gradlew cleanManagedDevices --unused-only &&
47+
./gradlew --stacktrace androidGroupDebugAndroidTest
48+
-Dorg.gradle.workers.max=1
49+
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
4950

50-
- name: Run Android Device Tests
51-
uses: bitfunk/android-emulator-runner@v1.0.0
51+
- name: Publish test report
52+
uses: mikepenz/action-junit-report@v3
53+
if: always()
5254
with:
53-
api-level: ${{ matrix.api-level }}
54-
target: google_apis
55-
arch: x86_64
56-
profile: Nexus 5
57-
avd-name: blueprint-${{ matrix.api-level }}
58-
force-avd-creation: false
59-
emulator-options: -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
60-
disable-animations: true
61-
script: ./gradlew --no-daemon --stacktrace connectedCheck
55+
report_paths: '**/build/test-results/**/TEST-*.xml'
6256

6357
- name: Analyze
58+
if: ${{ false }}
6459
env:
6560
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6661
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
67-
run: ./gradlew --no-daemon --stacktrace testCodeCoverageReport sonarqube
62+
run: ./gradlew --stacktrace testCodeCoverageReport sonarqube
6863

6964
- name: Publish documentation
7065
env:
7166
GRGIT_USER: ${{ github.actor }}
7267
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
73-
run: ./gradlew --no-daemon --stacktrace mkdocsPublish
68+
run: ./gradlew --stacktrace mkdocsPublish
7469

7570
- name: Publish Snapshot Version
7671
run: echo "TODO"

.github/workflows/ci-publish-release.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,6 @@ jobs:
1111

1212
runs-on: macos-latest
1313

14-
strategy:
15-
matrix:
16-
api-level: [ 30 ]
17-
18-
env:
19-
GITHUB_PACKAGE_DOWNLOAD_USER: ${{ secrets.GH_PACKAGE_DOWNLOAD_USER }}
20-
GITHUB_PACKAGE_DOWNLOAD_KEY: ${{ secrets.GH_PACKAGE_DOWNLOAD_KEY }}
21-
GITHUB_PACKAGE_UPLOAD_USER: ${{ secrets.GH_PACKAGE_UPLOAD_USER }}
22-
GITHUB_PACKAGE_UPLOAD_KEY: ${{ secrets.GH_PACKAGE_UPLOAD_KEY }}
23-
2414
steps:
2515
- uses: actions/checkout@v3
2616
with:
@@ -29,35 +19,34 @@ jobs:
2919
- name: Setup Java
3020
uses: actions/setup-java@v3
3121
with:
32-
distribution: 'temurin'
33-
java-version: '11'
22+
distribution: temurin
23+
java-version: 11
3424

3525
- name: Setup Android SDK
36-
uses: bitfunk/setup-android@v1.0.0
26+
uses: android-actions/setup-android@v2
3727

3828
- name: Setup Xcode
39-
uses: bitfunk/setup-xcode@v1.0.0
29+
uses: maxim-lobanov/setup-xcode@v1
4030
with:
4131
xcode-version: latest-stable
4232

4333
- name: Version
44-
run: ./gradlew --no-daemon --stacktrace versionInfo
34+
run: ./gradlew --stacktrace versionInfo
35+
36+
- name: Build
37+
run: ./gradlew --stacktrace build
4538

46-
- name: Build project
47-
run: ./gradlew --no-daemon --stacktrace build
39+
- name: Run Android instrumented tests
40+
run: ./gradlew cleanManagedDevices --unused-only &&
41+
./gradlew --stacktrace androidGroupDebugAndroidTest
42+
-Dorg.gradle.workers.max=1
43+
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
4844

49-
- name: Run Android Device Tests
50-
uses: bitfunk/android-emulator-runner@v1.0.0
45+
- name: Publish test report
46+
uses: mikepenz/action-junit-report@v3
47+
if: always()
5148
with:
52-
api-level: ${{ matrix.api-level }}
53-
target: google_apis
54-
arch: x86_64
55-
profile: Nexus 5
56-
avd-name: blueprint-${{ matrix.api-level }}
57-
force-avd-creation: false
58-
emulator-options: -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
59-
disable-animations: true
60-
script: ./gradlew --no-daemon --stacktrace connectedCheck
49+
report_paths: '**/build/test-results/**/TEST-*.xml'
6150

6251
- name: Publish Release Version
6352
run: echo "TODO"

.github/workflows/ci-pull-request-validation.yml

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,10 @@ jobs:
1515

1616
runs-on: macos-latest
1717

18-
strategy:
19-
matrix:
20-
api-level: [ 30 ]
21-
2218
concurrency:
2319
group: validation-${{ github.head_ref }}
2420
cancel-in-progress: true
2521

26-
env:
27-
GITHUB_PACKAGE_DOWNLOAD_USER: ${{ secrets.GH_PACKAGE_DOWNLOAD_USER }}
28-
GITHUB_PACKAGE_DOWNLOAD_KEY: ${{ secrets.GH_PACKAGE_DOWNLOAD_KEY }}
29-
GITHUB_PACKAGE_UPLOAD_USER: ${{ secrets.GH_PACKAGE_UPLOAD_USER }}
30-
GITHUB_PACKAGE_UPLOAD_KEY: ${{ secrets.GH_PACKAGE_UPLOAD_KEY }}
31-
3222
steps:
3323
- uses: actions/checkout@v3
3424
with:
@@ -38,41 +28,44 @@ jobs:
3828
- name: Setup Java
3929
uses: actions/setup-java@v3
4030
with:
41-
distribution: 'temurin'
42-
java-version: '11'
31+
distribution: temurin
32+
java-version: 11
4333

4434
- name: Setup Android SDK
45-
uses: bitfunk/setup-android@v1.0.0
35+
uses: android-actions/setup-android@v2
36+
37+
- name: Setup Gradle
38+
uses: gradle/gradle-build-action@v2
4639

4740
- name: Setup Xcode
48-
uses: bitfunk/setup-xcode@v1.0.0
41+
uses: maxim-lobanov/setup-xcode@v1
4942
with:
5043
xcode-version: latest-stable
5144

5245
- name: Version
53-
run: ./gradlew --no-daemon --stacktrace versionInfo
46+
run: ./gradlew --stacktrace versionInfo
5447

5548
- name: Build
56-
run: ./gradlew --no-daemon --stacktrace build
49+
run: ./gradlew --stacktrace build
50+
51+
- name: Run Android instrumented tests
52+
run: ./gradlew cleanManagedDevices --unused-only &&
53+
./gradlew --stacktrace androidGroupDebugAndroidTest
54+
-Dorg.gradle.workers.max=1
55+
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
5756

58-
- name: Run Android Device Tests
59-
uses: bitfunk/android-emulator-runner@v1.0.0
57+
- name: Publish test report
58+
uses: mikepenz/action-junit-report@v3
59+
if: always()
6060
with:
61-
api-level: ${{ matrix.api-level }}
62-
target: google_apis
63-
arch: x86_64
64-
profile: Nexus 5
65-
avd-name: blueprint-${{ matrix.api-level }}
66-
force-avd-creation: false
67-
emulator-options: -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
68-
disable-animations: true
69-
script: ./gradlew --no-daemon --stacktrace connectedCheck
61+
report_paths: '**/build/test-results/**/TEST-*.xml'
7062

71-
# - name: Analyze
72-
# env:
73-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74-
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
75-
# run: ./gradlew --no-daemon --stacktrace testCodeCoverageReport sonar
63+
- name: Analyze
64+
if: ${{ false }}
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
68+
run: ./gradlew --stacktrace testCodeCoverageReport sonar
7669

7770
- name: Publish Development Version
7871
run: echo "TODO"

0 commit comments

Comments
 (0)