Skip to content

Commit 7612a3d

Browse files
committed
CI with github action
1 parent 1965875 commit 7612a3d

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Pull request
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
Build:
7+
name: Build & Test
8+
runs-on: macOS-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
api: [ 28 ]
13+
abi: [ x86 ]
14+
tag: [ 'default']
15+
include:
16+
# - api: 31
17+
# abi: x86_64
18+
# tag: 'google_apis'
19+
- api: 30
20+
abi: x86
21+
tag: 'google_apis'
22+
steps:
23+
- uses: actions/checkout@v2.4.0
24+
- name: set up JDK
25+
uses: actions/setup-java@v2
26+
with:
27+
distribution: 'adopt'
28+
java-version: 11
29+
- name: Run tests
30+
run: ./gradlew test
31+
- name: Install Android SDK
32+
uses: malinskiy/action-android/install-sdk@release/0.1.2
33+
- name: Android Emulator test
34+
uses: malinskiy/action-android/emulator-run-cmd@release/0.1.2
35+
with:
36+
cmd: ./gradlew cAT
37+
api: ${{ matrix.api }}
38+
tag: ${{ matrix.tag }}
39+
abi: ${{ matrix.abi }}
40+
cmdOptions: -noaudio -no-boot-anim -no-window
41+
- uses: actions/upload-artifact@v2.3.1
42+
if: ${{ always() }}
43+
with:
44+
name: GEM-Espresso-${{ matrix.api }}-${{ matrix.abi }}-report
45+
path: ./**/build/reports/androidTests/connected
46+
- name: Archive screenshots
47+
uses: actions/upload-artifact@v2.3.1
48+
if: ${{ always() }}
49+
with:
50+
name: GEM-Screenshots-${{ matrix.api }}-${{ matrix.abi }}
51+
path: screenshots/adb
52+
Check:
53+
name: Check
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v2.4.0
58+
- name: Install Android SDK
59+
uses: malinskiy/action-android/install-sdk@release/0.1.2
60+
- name: Code checks
61+
run: ./gradlew check
62+
- name: Archive Lint report
63+
uses: actions/upload-artifact@v2.3.1
64+
if: ${{ always() }}
65+
with:
66+
name: GEM-Lint-report
67+
path: ./**/build/reports/lint-results.html

0 commit comments

Comments
 (0)