Skip to content

Commit 0047165

Browse files
authored
Create android_ci.yml
1 parent ae2dd5e commit 0047165

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/android_ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Android CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: gradle
23+
24+
- name: Cache Gradle and Wrapper
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.gradle/caches
29+
~/.gradle/wrapper
30+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
31+
restore-keys: |
32+
${{ runner.os }}-gradle-
33+
34+
- name: Grant execute permission for gradlew
35+
run: chmod +x gradlew
36+
37+
- name: Build with Gradle
38+
run: ./gradlew build -Dlint.baselines.continue=true
39+
40+
- name: Run tests
41+
run: ./gradlew test
42+
43+
- name: Upload build artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: app.apk
47+
path: ./app/build/outputs/apk/debug/app-debug.apk
48+
if-no-files-found: error

0 commit comments

Comments
 (0)