Slack에 error-log 연동하기 #15
Workflow file for this run
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
name: Java CI with Gradle & Add Jacoco Report | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- my-garden-be/** | |
jobs: | |
back-test-and-build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
defaults: | |
run: | |
working-directory: ./my-garden-be | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0 | |
- name: Test with Gradle | |
run: ./gradlew test -x npmBuild | |
- name: Add coverage to PR | |
id: jacoco | |
uses: madrapps/jacoco-report@v1.6.1 | |
with: | |
paths: | | |
${{ github.workspace }}/**/build/reports/jacoco/**/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 50 | |
min-coverage-changed-files: 65 | |
- name: Build with Gradle Wrapper | |
run: ./gradlew build -x test -x npmBuild # 위에서 테스트를 실행하므로, 테스트는 제외 // npm Build도 여기서 확인하지 않음 | |