-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create GitHub Action to check
gradle build
works
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build Project | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
checkout-ref: | ||
description: "The branch, tag or SHA to checkout. See actions/checkout 'ref'." | ||
required: false | ||
type: string | ||
|
||
concurrency: | ||
group: "Build Project: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
validate-gradle-wrapper: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.checkout-ref || github.ref }} | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
|
||
build-gradle: | ||
needs: validate-gradle-wrapper | ||
strategy: | ||
matrix: | ||
os: | ||
- macos-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
fail-fast: true | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.checkout-ref || github.ref }} | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
cache-encryption-key: ${{ secrets.GRADLE_CONFIGURATION_CACHE_ENCRYPTION_KEY }} | ||
|
||
- name: Run tests | ||
run: ./gradlew build --scan --stacktrace |