Skip to content

Commit

Permalink
fix: ci yaml 파일 수정 41
Browse files Browse the repository at this point in the history
yml 파일 하나로 재테스트
  • Loading branch information
shoeone96 committed Dec 22, 2023
1 parent 40d9ef8 commit d1f402f
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/pr_sync_ci.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Spring Boot Gradle Test Workflow
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Repository checkout
uses: actions/checkout@v2

- name: Set up MySQL
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: "8.0"
root-password: ${{secrets.TEST_DB_PASSWORD}}
user: ${{secrets.TEST_DB_USERNAME}}
password: ${{secrets.TEST_DB_PASSWORD}}

# java 설치
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'liberica'

# 환경 변수 적용
- name: Configure application.yaml under test directory
uses: microsoft/variable-substitution@v1
with:
files: ./src/main/resources/application.yaml
env:
spring.datasource.url: jdbc:mysql://localhost:3306/${{ secrets.TEST_DATABASE }}
spring.datasource.username: ${{ secrets.TEST_DB_USERNAME }}
spring.datasource.password: ${{ secrets.TEST_DB_PASSWORD }}

# gradle 권한 추가
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# run 명령어로 schema 만드는 명령어 실행
- name: Into Schema
run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql

# 프로젝트 빌드
- name: Build with Gradle
run: ./gradlew clean build
#name: Spring Boot Gradle Test Workflow
#on:
# pull_request:
# branches:
# - main
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Repository checkout
# uses: actions/checkout@v2
#
# - name: Set up MySQL
# uses: shogo82148/actions-setup-mysql@v1
# with:
# mysql-version: "8.0"
# root-password: ${{secrets.TEST_DB_PASSWORD}}
# user: ${{secrets.TEST_DB_USERNAME}}
# password: ${{secrets.TEST_DB_PASSWORD}}
#
# # java 설치
# - name: Set up JDK 17
# uses: actions/[email protected]
# with:
# java-version: '17'
# distribution: 'liberica'
#
# # 환경 변수 적용
# - name: Configure application.yaml under test directory
# uses: microsoft/variable-substitution@v1
# with:
# files: ./src/main/resources/application.yaml
# env:
# spring.datasource.url: jdbc:mysql://localhost:3306/${{ secrets.TEST_DATABASE }}
# spring.datasource.username: ${{ secrets.TEST_DB_USERNAME }}
# spring.datasource.password: ${{ secrets.TEST_DB_PASSWORD }}
#
# # gradle 권한 추가
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
#
# # run 명령어로 schema 만드는 명령어 실행
# - name: Into Schema
# run: mysql -h localhost -P 3306 -u ${{secrets.TEST_DB_USERNAME}} -p${{secrets.TEST_DB_PASSWORD}} --protocol=tcp < ./mysql/schema.sql
#
# # 프로젝트 빌드
# - name: Build with Gradle
# run: ./gradlew clean build

0 comments on commit d1f402f

Please sign in to comment.