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 : Build & Test
2+
3+ on :
4+ push :
5+ branches : [master]
6+
7+ jobs :
8+ build :
9+ name : Build Project
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - name : Set up JDK 21
14+ uses : actions/setup-java@v4
15+ with :
16+ java-version : 21
17+ distribution : ' temurin'
18+ - name : Cache Gradle dependencies
19+ uses : actions/cache@v3
20+ with :
21+ path : |
22+ ~/.gradle/caches
23+ ~/.gradle/wrapper
24+ key : " ${{runner.os}}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties')}}"
25+ restore-keys : |
26+ ${{ runner.os }}-gradle-
27+ - name : Build with Gradle
28+ run : |
29+ chmod +x gradlew
30+ ./gradlew clean build --stacktrace
31+
32+ tests :
33+ name : Run Tests
34+ runs-on : ubuntu-latest
35+ needs : build
36+ steps :
37+ - uses : actions/checkout@v4
38+ - name : Set up JDK 21
39+ uses : actions/setup-java@v4
40+ with :
41+ java-version : ' 21'
42+ distribution : ' temurin'
43+ - name : Cache Gradle dependencies
44+ uses : actions/cache@v3
45+ with :
46+ path : |
47+ ~/.gradle/caches
48+ ~/.gradle/wrapper
49+ key : " ${{runner.os}}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties')}}"
50+ restore-keys : |
51+ ${{ runner.os }}-gradle-
52+ - name : Run Module Tests
53+ run : |
54+ chmod +x gradlew
55+ ./gradlew clean test
You can’t perform that action at this time.
0 commit comments