-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.3 KB
/
tests-jdk-gradle.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
name: Run tests
on:
workflow_call:
inputs:
runs-on:
required: false
description: Platform to execute on
type: string
jobs:
test:
name: Run tests using gradle wrapper.
runs-on: ${{ fromJSON(inputs.runs-on) }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Cache build .gradle dir
uses: actions/cache@v3
with:
path: .gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache user .gradle dir
uses: actions/cache@v3
with:
path: ~/.gradle
key: ${{ runner.os }}-gradleuser-${{ hashFiles('**/build.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradleuser-
- name: Install docker-compose (self-hosted runner does not have it by default)
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.3.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run tests
run: ./gradlew test -i