-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.64 KB
/
test-pipeline.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
name: test
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:latest
ports:
- 27017:27017
options: --health-cmd="mongosh --eval 'db.adminCommand(\"ping\")'" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v3
- name: JDK 17 설치
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: secret 설정 파일(yml) 추가
run: |
cd ./src/main/resources
touch ./application-secret.yml
echo "${{ secrets.APPLICATION_SECRET }}" > ./application-secret.yml
ls -a .
- name: firebase_service_key.json 구성
run: |
cd ./src/main/resources
touch ./firebase_service_key.json
echo "${{ secrets.FCM_KEY }}" > ./firebase_service_key.json
ls -a .
- name: firebase_service_key.json 파일 생성
id: create-json
uses: jsdaniell/[email protected]
with:
name: "firebase_service_key.json"
json: ${{ secrets.FCM_KEY }}
- name: JSON 파일 이동 및 로그 확인
run: |
mv ./firebase_service_key.json ./src/main/resources/firebase_service_key.json
cd ./src/main/resources
ls -a .
- name: Gradle 권한 허용
run: chmod +x gradlew
- name: PR 및 PUSH 전, 테스트 확인
run: ./gradlew test
env:
MONGO_HOST: localhost
MONGO_PORT: 27017