-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 853 Bytes
/
java.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
36
37
38
# source: https://github.com/sindre0830/Workflow-Templates
name: Java workflow
# when to run the workflow
on:
push:
paths:
- '.github/workflows/java.yml'
- 'examples/java/**'
pull_request:
workflow_dispatch:
# instructions the workflow will perform
jobs:
build:
# environment to run on
runs-on: ubuntu-latest
# steps to perform
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: 'gradle'
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: current
- name: Build program
working-directory: examples/java
run: gradle build --no-daemon
- name: Run tests
working-directory: examples/java
run: gradle test