-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build.yml to use gradle action
specifies jdk to 17 uses official gradle github action which has built in caching.
1 parent
88e97cf
commit 4ffbbce
Showing
1 changed file
with
18 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
name: Build and Test | ||
name: Java CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths-ignore: | ||
- '*.md' | ||
pull_request: | ||
branches: [ "master" ] | ||
paths-ignore: | ||
- '*.md' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-gradle: | ||
name: Build and test in Gradle | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@master | ||
|
||
- name: Restore Gradle caches | ||
uses: actions/cache@master | ||
env: | ||
cache-name: gradle-cache | ||
with: | ||
path: ~/.gradle | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{hashFiles('**/build.gradle') }} | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
|
||
- name: Run Gradle build and test | ||
run: ./gradlew clean build | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v2.9.0 | ||
with: | ||
arguments: build |