Skip to content

Commit

Permalink
fix: 테스트 패키지에서 테스트를 실행하기 위한 test yml 파일 생성 (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh authored Apr 2, 2024
2 parents 088994e + efbd7d5 commit 6cf13a3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ jobs:
# 3) 환경변수 파일 생성
- name: Copy application-local.yml
run: |
# application-local.yml 생성
# application-local.yml, application-test.yml 생성
touch ./src/main/resources/application-local.yml
touch ./src/test/resources/application-test.yml
# application.yaml 파일 값 입력
echo "${{ secrets.APPLICATION_LOCAL_YML }}" >> ./src/main/resources/application-local.yaml
# application-local.yml, application-test.yml 파일 값 입력
echo "${{ secrets.APPLICATION_LOCAL_YML }}" >> ./src/main/resources/application-local.yml
echo "${{ secrets.APPLICATION_LOCAL_YML }}" >> ./src/test/resources/application-test.yml
# application.yaml 파일 확인
cat ./src/main/resources/application-local.yaml
# application-local.yml, application-test.yml 파일 확인
cat ./src/main/resources/application-local.yml
cat ./src/test/resources/application-test.yml
shell: bash

# 이 워크플로우는 gradle build
Expand All @@ -48,5 +52,5 @@ jobs:
- name: Build with Gradle
run: |
./gradlew build -x test
./gradlew build
13 changes: 9 additions & 4 deletions .github/workflows/release-dev-code_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ 'dev' ]

env:
RESOURCE_PATH: ./src/main/resources/application-local.yaml
RESOURCE_PATH: ./src/main/resources/application-local.yml

jobs:
build:
Expand All @@ -28,11 +28,16 @@ jobs:
java-version: '17'

- name: mkdir resources folder
run: touch ./src/main/resources/application-local.yml
run: |
touch ./src/main/resources/application-local.yml
touch ./src/test/resources/application-test.yml
shell: bash

- name: copy yaml file
run: echo "${{ secrets.APPLICATION_LOCAL_YML }}" > ./src/main/resources/application-local.yml
- name: copy yml file
run: |
echo "${{ secrets.APPLICATION_LOCAL_YML }}" > ./src/main/resources/application-local.yml
echo "${{ secrets.APPLICATION_LOCAL_YML }}" > ./src/test/resources/application-test.yml
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
tags: [ 'makers-app-develop' ]

env:
RESOURCE_PATH: ./src/main/resources/application-prod.yaml
RESOURCE_PATH: ./src/main/resources/application-prod.yml

jobs:
build:
Expand All @@ -29,11 +29,15 @@ jobs:
java-version: '17'

- name: mkdir resources folder
run: touch ./src/main/resources/application-prod.yml
run: |
touch ./src/main/resources/application-prod.yml
touch ./src/test/resources/application-test.yml
shell: bash

- name: copy yaml file
run: echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application-prod.yml
- name: copy yml file
run: |
echo "${{ secrets.APPLICATION_YML }}" > ./src/main/resources/application-prod.yml
echo "${{ secrets.APPLICATION_YML }}" > ./src/test/resources/application-test.yml
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down

0 comments on commit 6cf13a3

Please sign in to comment.