File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Java CI with Gradle
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v2
18+
19+ - name : Set up JDK 11
20+ uses : actions/setup-java@v3
21+ with :
22+ java-version : ' 11'
23+ distribution : ' adoptopenjdk' # Ensure you're using a distribution of your choice
24+
25+ - name : Cache Gradle dependencies
26+ uses : actions/cache@v2
27+ with :
28+ path : ~/.gradle/caches
29+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
30+ restore-keys : |
31+ ${{ runner.os }}-gradle-
32+
33+ - name : Build with Gradle
34+ run : ./gradlew build --no-daemon
35+
36+ - name : Run tests
37+ run : ./gradlew test --no-daemon
38+
39+ - name : Upload test results
40+ if : always()
41+ uses : actions/upload-artifact@v2
42+ with :
43+ name : test-results
44+ path : build/test-results/test
You can’t perform that action at this time.
0 commit comments