-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.41 KB
/
ci.yml
File metadata and controls
85 lines (72 loc) · 2.41 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
pull_request:
branches:
- 'dev'
types:
- opened
- reopened
- synchronize
#동시성 환경을 해결한다
concurrency:
group: ${{ github.ref }} # 동일한 PR에 대한 식별자
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
# services:
# redis:
# image: redis:7-alpine
# ports:
# - 6379:6379
# options: >-
# --health-cmd "redis-cli ping"
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
steps:
- uses: actions/checkout@v4
- name: JDK 21 를 준비한다.
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Docker 소켓 권한을 설정한다.
run: |
sudo chmod 666 /var/run/docker.sock
docker ps
- name: gradlew 의 root 실행권한을 부여한다.
run: chmod +x gradlew
- name: Gradle 를 준비한다.
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: 테스트 애플리케이션yml을 생성한다
run: |
mkdir -p src/test/resources
echo "${{ secrets.APPLICATION_TEST_YML }}" | base64 -d > src/test/resources/application.yml
- name: firebase-account.json 정보 넣기
run: |
echo "${{ secrets.TEST_FIREBASE_SERVICE_KEY_BASE64_ENCODE }}" | base64 --decode > src/main/resources/firebase-account.json
cat src/main/resources/firebase-account.json
- name: 빌드한다.
run: ./gradlew build --stacktrace
# Test 후 Report 생성
- name: 테스트 결과를 게시한다.
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: '**/build/test-results/test/TEST-*.xml'
- name: 실패시 공지한다.
if: failure()
run: |
echo failed!
- name: Jacoco 테스트 커버리지 리포트(PR 반영)
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 50
min-coverage-changed-files: 50
title: "🌻 테스트 커버리지 리포트"
update-comment: true