File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments