Skip to content

Commit

Permalink
Github Action 워크플로우 추가
Browse files Browse the repository at this point in the history
- gradle 빌드 테스트
- gradlew 유닛 테스트
- 테스트 커버리지 코멘트 작성
  • Loading branch information
One-armed-boy committed Mar 4, 2024
1 parent 16420e9 commit 23b1431
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Check PR

on:
pull_request

permissions:
checks: write
pull-requests: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Cache Gradle
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: Check Build
run: ./gradlew clean build

- name: Run test
run: ./gradlew test

- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
update-comment: true
title: Test Coverage
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'

0 comments on commit 23b1431

Please sign in to comment.