-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.77 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
49
50
51
52
53
54
55
56
57
58
name: Spring Boot CI
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
env:
DB_PASSWORD: ${{secrets.DB_PASSWORD}}
DB_USERNAME: ${{secrets.DB_USERNAME}}
JANG_HEADER: ${{secrets.JANG_HEADER}}
JANG_URL: ${{secrets.JANG_URL}}
JANG_DATASOURCE_UID: ${{secrets.JANG_DATASOURCE_UID}}
KWON_HOST: ${{secrets.KWON_HOST}}
KWON_PASSWORD: ${{secrets.KWON_PASSWORD}}
KWON_USERNAME: ${{secrets.KWON_USERNAME}}
G_EMAIL: ${{secrets.G_EMAIL}}
G_PASSWORD: ${{secrets.G_PASSWORD}}
ACCESS_TOKEN_SECRET: ${{secrets.ACCESS_TOKEN_SECRET}}
REFRESH_TOKEN_SECRET: ${{secrets.REFRESH_TOKEN_SECRET}}
OPEN_API_SECRET_KEY: ${{secrets.OPEN_API_SECRET_KEY}}
OPEN_API_TOKEN: ${{secrets.OPEN_API_TOKEN}}
S3_ACCESS_KEY: ${{secrets.S3_ACCESS_KEY}}
S3_ACCESS_SECRET_KEY: ${{secrets.S3_ACCESS_SECRET_KEY}}
WASIN_SERVICE_KEY: ${{secrets.WASIN_SERVICE_KEY}}
working-directory: ./be/stackoverflow-be
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: ~/wasin/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and Test
run: |
chmod +x ./gradlew
./gradlew clean build
working-directory: ./wasin
- name: Run Spring Boot App for 30 seconds
run: |
./gradlew bootRun &
APP_PID=$!
sleep 30
kill $APP_PID
continue-on-error: false
working-directory: ./wasin