Skip to content

Lint/checkstyle report PR 테스트 #12

Lint/checkstyle report PR 테스트

Lint/checkstyle report PR 테스트 #12

Workflow file for this run

name: CI Pipeline
on:
pull_request:
branches:
- test
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- 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: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build --no-daemon
# 추가
- name: Leave a comment for test coverage
id: jacoco
uses: madrapps/[email protected]
with:
title: 📊 Test Coverage Report
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml # JaCoCo 리포트 위치
token: ${{ github.token }}
min-coverage-overall: 80 # 전체 프로젝트의 커버리지가 80% 이상이어야 통과
min-coverage-changed-files: 80 # 수정된 파일에 대한 최소 커버리지가 80% 이상이어야 통과
pass-emoji: '✅' # 통과 이모지 (default : ":apple:")
# update-comment: true # true로 설정하는 경우 기존 코멘트를 업데이트하는 형태로 동작
# Checkstyle 추가
- name: Run check style
uses: nikitasavinov/checkstyle-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: 'github-pr-check'
tool_name: 'checkstyle'
checkstyle_version: 10.18.0
checkstyle_config: 'config/checkstyle/naver-checkstyle-rules.xml'
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Run tests
run: ./gradlew test --no-daemon