Skip to content

[KAN-8] CICD 설정 #17

[KAN-8] CICD 설정

[KAN-8] CICD 설정 #17

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
permissions:
contents: read
checks: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🔄 체크아웃
uses: actions/checkout@v4
- name: ☕ JDK 17 설치
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'corretto'
- name: 📝 application.yml 생성
run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.PROPERTIES }}" > ./application.yml
shell: bash
- name: 🚀 Redis 실행
uses: supercharge/[email protected]
with:
redis-version: latest
- name: 🔧 빌드 권한 부여
run: chmod +x gradlew
- name: 🛠️ 테스트 프로파일 설정
run: echo "SPRING_PROFILES_ACTIVE=test" >> $GITHUB_ENV
- name: 🏗️ 프로젝트 빌드
run: ./gradlew clean build
- name: 📊 자코코 리포트 작성
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: 0
- name: ✅ 테스트 리포트 작성
uses: mikepenz/action-junit-report@v4
with:
report_paths: '**/build/test-results/test/TEST-*.xml'