Skip to content

[TASK-354] Github Actions로 CI 테스트(동적) 체인 구축 #4

[TASK-354] Github Actions로 CI 테스트(동적) 체인 구축

[TASK-354] Github Actions로 CI 테스트(동적) 체인 구축 #4

Workflow file for this run

name: Java CI with Gradle
on:
pull_request:
branches: [ "main", "develop", "feature/**" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Test with gradle
run: ./gradlew test
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: 'build/test-results/test/TEST-*.xml'
- name: Add comments to a pull request
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: 'build/test-results/test/TEST-*.xml'
- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
title: 📝 Jacoco Test Coverage
paths: ${{ github.workspace }}/**/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
update-comment: true
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'