Skip to content

Commit 85f560a

Browse files
authored
Create andriodgradle.yml
1 parent 7e70f37 commit 85f560a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: andriodgradle
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v4
16+
with:
17+
distribution: 'zulu'
18+
java-version: '17'
19+
20+
# - name: Cache Gradle packages
21+
# uses: actions/cache@v4
22+
# with:
23+
# path: |
24+
# ~/.gradle/caches
25+
# ~/.gradle/wrapper/
26+
# key: ${{ runner.os }}-gradle-v1-${{ hashFiles('**/build.gradle', '**/build.gradle.kts', '**/settings.gradle', '**/settings.gradle.kts', '**/gradle.lockfile') }}
27+
# restore-keys: |
28+
# ${{ runner.os }}-gradle-v1-
29+
30+
- name: Grant execute permission for Gradle Wrapper
31+
run: chmod +x ./gradlew
32+
33+
- name: Build with Gradle
34+
run: ./gradlew build
35+
36+
- name: Run Unit Tests
37+
run: ./gradlew test
38+
39+
- name: Notify Success
40+
if: success()
41+
run: echo "Build and tests passed!"
42+
43+
- name: Notify Failure
44+
if: failure()
45+
run: echo "Build or tests failed!"

0 commit comments

Comments
 (0)