Skip to content

Commit

Permalink
chore: jacoco test coverage report 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonise committed Mar 8, 2024
1 parent 1284bd0 commit 16c677c
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Report PR Test

on:
pull_request:
branches:
- dev
push:
branches:
- dev

permissions:
checks: write
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys:
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Test with Gradle
run: ./gradlew --info test

- name: Publish Unit Test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: build/test-results/**/*.xml

- name: Publish test coverage report
id: jacoco
uses: madrapps/[email protected]
with:
title: Test Coverage Report
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.ACCESS_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 50

0 comments on commit 16c677c

Please sign in to comment.