forked from owncloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (76 loc) · 2.33 KB
/
Android-CI.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
name: PullRequest
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
Build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macOS-14 ]
java_version: [ 17 ]
steps:
- uses: actions/[email protected]
with:
submodules: true
fetch-depth: 0 # 0 indicates all history
- run: git fetch --all || echo "==> Accept any result"
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- name: Install Android SDK
uses: hannesa2/action-android/[email protected]
- name: Build with Gradle
run: ./gradlew assembleDebug
# - name: Run instrumentation tests
# uses: hannesa2/action-android/[email protected]
# with:
# cmd: ./gradlew cAT -Pandroid.testInstrumentationRunnerArguments.notAnnotation=com.owncloud.android.testutil.annotation.FailsOnGithubAction --continue
# api: 28
# tag: default
# abi: x86
# - uses: actions/[email protected]
# if: ${{ always() }}
# with:
# name: owncloudApp-Espresso-test-report
# path: ${{ github.workspace }}/**/build/reports/androidTests/connected/*
# - name: Save logcat output
# uses: actions/[email protected]
# if: failure()
# with:
# name: ownCloud-logcat
# path: artifacts/logcat.log
Check:
name: Check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
java_version: [ 17 ]
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: true
fetch-depth: 0
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java_version }}
- uses: gradle/wrapper-validation-action@v3
- name: Install Android SDK
uses: hannesa2/action-android/[email protected]
- name: Code checks
run: ./gradlew check
- name: Archive Lint report
uses: actions/[email protected]
if: ${{ always() }}
with:
name: ownCloud-Lint-report
path: lint-app-report.html