Skip to content

Commit

Permalink
Update CI.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwonminwoo authored Dec 15, 2023
1 parent 8eed79f commit 2140058
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/CI.yml
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
Expand All @@ -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

0 comments on commit 2140058

Please sign in to comment.