-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.24 KB
/
spring-boot-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
name: Spring Boot CI
on:
pull_request:
branches:
- main # 'main' 브랜치로 PR이 생성될 때만 실행
env:
JWT_ACCESS_SECRET: ${{secrets.JWT_ACCESS_SECRET}}
JWT_REFRESH_SECRET: ${{secrets.JWT_REFRESH_SECRET}}
TOSS_PAYMENT_SECRET: ${{secrets.TOSS_PAYMENT_SECRET}}
SENDER: ${{secrets.SENDER}}
GMAIL_PASSWORD: ${{secrets.GMAIL_PASSWORD}}
EMAIL_TEST_CODE: ${{secrets.EMAIL_TEST_CODE}}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: ~/sunsu-wedding/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and Test
run: ./gradlew clean build
working-directory: ./sunsu-wedding
- name: Run Spring Boot App for 30 seconds
run: |
./gradlew bootRun &
APP_PID=$!
sleep 30
kill $APP_PID
continue-on-error: false
working-directory: ./sunsu-wedding