-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (58 loc) · 1.84 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: 굿즈포유 CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: get repository
uses: actions/checkout@v3
with:
token: ${{secrets.GOODSFORYOU_TOKEN}}
submodules: recursive
- name: install JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/checkout@v3
- run: touch ./src/main/resources/application-aws.yml
- run: echo "${{secrets.APPLICATION_AWS}}" > ./src/main/resources/application-aws.yml
- name: SetUp MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql version: '8.0.27'
mysql database: 'GoodsForYou'
mysql user: 'admin'
mysql password: '1234'
- name: grant permission to execute gradle command
run: chmod +x gradlew
- name: run gradle build
run: ./gradlew build --stacktrace
- name: add typos-action as check spell
uses: crate-ci/typos@v1.0.4
with:
files: 'src/**'
- name: register test coverage as a comment in PR
id: jacoco
uses: madrapps/jacoco-report@v1.2
if: always()
with:
title: 📝 테스트 커버리지 리포트입니다
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
- name: if test fail, add check comment on failed code line
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
token: ${{ github.token }}