-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (35 loc) · 1.21 KB
/
pr-test.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
name: PR Test
on:
pull_request:
branches: [ main, dev ] # branch에 PR을 보낼 때 실행
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up jdk 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
# Cache Gradle dependencies
- name: Cache Gradle dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle
# Gradle wrapper 파일 실행 권한주기
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Enable Gradle build cache
- name: Enable Gradle build cache
run: echo "org.gradle.caching=true" >> gradle.properties
# Gradle test를 실행한다
- name: Test with Gradle
run: |
./gradlew --info :user:test -Dspring.profiles.active=dev && \
./gradlew --info :server:test -Dspring.profiles.active=dev && \
./gradlew --info test -x :user:test -x :server:test