Repository navigation
71 lines (61 loc) · 1.59 KB
/
Copy pathci.yml
File metadata and controls
71 lines (61 loc) · 1.59 KB
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
name: CI
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- 'assets/**'
pull_request:
branches:
- dev
- beta
- main
paths-ignore:
- '**.md'
- 'assets/**'
workflow_call:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI: true
ANDROID_PLATFORM: platforms;android-37.0
ANDROID_BUILD_TOOLS: build-tools;36.0.0
jobs:
verify:
# Hosted runners: pull requests from forks run here, never on a machine of the project.
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
- name: Set up Java
uses: actions/setup-java@v6.0.1
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.4.0
- name: Install Android SDK packages
run: yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install "$ANDROID_PLATFORM" "$ANDROID_BUILD_TOOLS" > /dev/null
- name: Test, lint and build
run: |
./gradlew --stacktrace \
testDebugUnitTest \
:app:compileDebugAndroidTestKotlin \
lintDebug \
:app:assembleRelease
- name: Upload reports
if: ${{ failure() }}
uses: actions/upload-artifact@v7.0.1
with:
name: reports
path: |
**/build/reports/
**/build/test-results/
if-no-files-found: ignore
retention-days: 14