-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8eed79f
commit 2140058
Showing
1 changed file
with
13 additions
and
24 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,10 +1,17 @@ | ||
name: Java CI with Gradle | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Spring Boot & Gradle CI/CD | ||
|
||
on: | ||
push: | ||
branches: [ "main", "develop" ] | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main", "develop" ] | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -15,33 +22,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the code | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'oracle' | ||
|
||
distribution: 'temurin' | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with Gradle | ||
uses: gradle/[email protected] | ||
with: | ||
arguments: build | ||
cache-read-only: ${{ github.ref != 'ref/heads/main' && github.ref != 'ref/heads/develop' }} | ||
|
||
- name: Publish result of unit test | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
files: "**/build/test-results/test/TEST-*.xml" | ||
|
||
|
||
- name: Publish failure of unit test | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
report_paths: '**/build/test-results/test/TEST-*.xml' | ||
run : ./gradlew clean build --exclude-task test |