-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (47 loc) · 1.67 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: 'CI'
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
env:
DOCKER_ID: ${{ secrets.DOCKER_ID }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_IMAGE_NAME: ${{ secrets.DOCKER_IMAGE_NAME }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 리포지토리를 가져옵니다
uses: actions/checkout@v3
with:
token: ${{ secrets.SUBMODULE_TOKEN }}
submodules: recursive
- name: JDK 11을 설치합니다
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Gradle 명령 실행을 위한 권한을 부여합니다
run: chmod +x gradlew
- name: Gradle build를 수행합니다
run: ./gradlew build -P DOCKER_ID=${{ secrets.DOCKER_ID }} -P DOCKER_PASSWORD=${{ secrets.DOCKER_PASSWORD }} -P DOCKER_IMAGE_NAME=${{ secrets.DOCKER_IMAGE_NAME }}
- name: 테스트 결과를 PR에 코멘트로 등록합니다
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: '**/build/test-results/test/TEST-*.xml'
- name: 테스트 커버리지를 PR에 코멘트로 등록합니다
id: jacoco
uses: madrapps/[email protected]
with:
title: 📝 테스트 커버리지 리포트입니다
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
# paths: /build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 50
min-coverage-changed-files: 50