-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (57 loc) · 1.59 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
name: Continuous Integration
on:
pull_request:
branches: [ "develop" ]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
tags:
description: 'Test scenario tags'
required: false
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: false
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-20.04
steps:
# 1. Compare branch 코드 내려 받기
- name: Checkout PR
uses: actions/checkout@v3
# 2. 자바 환경 설정
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# 3. Spring 환경 변수 설정
- name: Set up application.yml
run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.APPLICATION }}" > ./application.yml
shell: bash
# 4. 테스트를 위한 MySQL 설정
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql database: ${{ secrets.MYSQL_DATABASE }}
mysql user: ${{ secrets.MYSQL_USERNAME }}
mysql password: ${{ secrets.MYSQL_PASSWORD }}
# 5. 테스트를 위한 빌드 실행
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25
with:
arguments: build