-
-
Notifications
You must be signed in to change notification settings - Fork 34
102 lines (102 loc) · 3.96 KB
/
ci.yaml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: malinskiy/action-android/install-sdk@release/0.1.6
- name: build & test
run: ./gradlew assemble test jacocoTestReport
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: archive test results
if: failure()
run: (cd adam/build/reports/tests/test; zip -r -X ../../../../../test-result.zip .)
- name: Save test output
uses: actions/upload-artifact@master
if: failure()
with:
name: test-result
path: test-result.zip
- name: archive test coverage
run: (cd adam/build/reports/jacoco/test/html; zip -r -X ../../../../../test-coverage.zip .)
- name: Save coverage output
uses: actions/upload-artifact@master
with:
name: test-coverage
path: test-coverage.zip
- name: codecov unit tests
run: bash <(curl -s https://codecov.io/bash) -f ./adam/build/reports/jacoco/test/jacocoTestReport.xml -F unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration-test:
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
api: [ 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34 ]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: malinskiy/action-android/install-sdk@release/0.1.6
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: integration test
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.6
timeout-minutes: 25
with:
cmd: ./gradlew :adam:integrationTest
cmdOptions: -no-snapshot-save -noaudio -no-boot-anim -cores 4 -memory 3072 -no-window -gpu auto -grpc 8554
api: ${{ matrix.api }}
tag: google_apis
abi: x86_64
bootTimeout: 1200
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/integrationTest/TEST-*.xml'
- name: Generate integration code coverage report
run: ./gradlew :adam:jacocoIntegrationTestReport
- name: archive integration test results
if: failure()
run: (cd adam/build/reports/tests/integrationTest; zip -r -X ../../../../../integration-test-result.zip .)
- name: Save integration test output
uses: actions/upload-artifact@master
if: failure()
with:
name: integration-test-result
path: integration-test-${{ matrix.api }}-result.zip
- name: archive test coverage
run: (cd adam/build/reports/jacoco/jacocoIntegrationTestReport/html; zip -r -X ../../../../../../integration-test-coverage.zip .)
- name: Save coverage output
uses: actions/upload-artifact@master
with:
name: integration-test-${{ matrix.api }}-coverage
path: integration-test-coverage.zip
- name: Save logcat output
uses: actions/upload-artifact@master
if: failure()
with:
name: logcat-${{ matrix.api }}
path: artifacts/logcat.log
- name: codecov integartion tests
run: bash <(curl -s https://codecov.io/bash) -f ./adam/build/reports/jacoco/jacocoIntegrationTestReport/jacocoIntegrationTestReport.xml -F integration
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}