-
Notifications
You must be signed in to change notification settings - Fork 16
71 lines (63 loc) · 1.73 KB
/
backend-CI-test.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
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Java CI with Gradle
on:
pull_request:
branches: [ main, develop ]
workflow_dispatch:
inputs:
logLevel:
description: ‘Log level’
required: true
default: ‘info’
type: choice
options:
- info
- warning
- debug
environment:
description: ‘Environment to run tests against’
type: environment
required: true
defaults:
run:
working-directory: backend
permissions:
contents: read
jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'BE')
runs-on: ubuntu-22.04
permissions:
pull-requests: write
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: 레포지토리 체크아웃
uses: actions/checkout@v3
with:
token: ${{ secrets.SUBMODULE_TOKEN }}
submodules: true
- name: JDK 17을 설치합니다.
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: gradlew 권한을 부여합니다.
run: chmod +x gradlew
- name: Gradle을 통해 빌드합니다.
run: ./gradlew build
- name: jacocoTestCoverage를 실행하고 리포트를 출력합니다.
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