Skip to content

[DEV-6] Github Action CI 워크플로우 작성 #1

[DEV-6] Github Action CI 워크플로우 작성

[DEV-6] Github Action CI 워크플로우 작성 #1

Workflow file for this run

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:'