-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (60 loc) · 2.46 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
73
74
75
76
77
78
name: pothole Build & Test & Run
on:
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: GitHub Repository Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: application.yml 생성
shell: bash
run: |
mkdir -p ./pothole-core/src/main/resources
cd ./pothole-core/src/main/resources
touch ./application-core-dev.yml
echo "${{ secrets.CORE_APPLICATION_DEV_YML }}" > ./application-core-dev.yml
mkdir -p ./pothole-manager-api/src/main/resources
cd ./pothole-manager-api/src/main/resources
touch ./application.yml
echo "${{ secrets.MANAGER_APPLICATION_YML }}" > ./application.yml
touch ./application-aws.yml
echo "${{ secrets.MANAGER_APPLICATION_DEV_YML }}" > ./application-manager-dev.yml
mkdir -p ./pothole-worker-api/src/main/resources
cd ./pothole-worker-api/src/main/resources
touch ./application.yml
echo "${{ secrets.WORKER_APPLICATION_YML }}" > ./application.yml
touch ./application-aws.yml
echo "${{ secrets.WORKER_APPLICATION_DEV_YML }}" > ./application-worker-dev.yml
- name: Pothole [Core] Module Build with Gradle
run: ./gradlew clean pothole-core:bootJar -x test
- name: Pothole [Core] Module test
run: ./gradlew clean pothole-core:test
- name: Pothole [Manager] Module Build with Gradle
run: ./gradlew clean pothole-manager-api:bootJar -x test
- name: Pothole [Manager] Module test
run: ./gradlew clean pothole-manager-api:test
- name: Pothole [Worker] Module Build with Gradle
run: ./gradlew clean pothole-worker-api:bootJar -x test
- name: Pothole [Worker] Module test
run: ./gradlew clean pothole-worker-api:test
- name: Manager 모듈 실행
if: (contains(github.head_ref, 'manager') || contains(github.head_ref, 'core'))
run: |
cd ./pothole-manager-api
ls -l
java -Dspring.profiles.active=manager-dev -jar /build/libs/*.jar
- name: worker 모듈 실행
if: (contains(github.head_ref, 'worker') || contains(github.head_ref, 'core'))
run: |
cd ./pothole-worker-api
ls -l
java -Dspring.profiles.active=worker-dev -jar /build/libs/*.jar