-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.02 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Build and test
on: [push]
jobs:
build:
name: Checkout code and test, clean build
runs-on: ubuntu-latest
steps:
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Checkout code
uses: actions/checkout@master
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('build.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-cache-
- uses: actions/cache@v4
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run tests
run: |
./gradlew test --stacktrace
- name: Run clean build
run: |
./gradlew clean build