Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI에서는 h2 사용으로 변경 #256

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .github/workflows/backend_ci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
name: 백엔드 CI

on:
pull_request_target:
pull_request:
branches:
- dev/be
- develop
- main
types: [opened, reopened, synchronize]


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 체크아웃
uses: actions/checkout@v4

- name: MySQL 실행
uses: mirromutth/[email protected]
with:
host port: ${{ secrets.MYSQL_HOST_PORT }}
container port: ${{ secrets.MYSQL_CONTAINER_PORT }}
mysql version: ${{ secrets.MYSQL_VERSION }}
mysql database: ${{ secrets.MYSQL_DATABASE }}
mysql root password: ${{ secrets.MYSQL_PASSWORD }}

- name: DB 관련 스프링 설정 생성
working-directory: ./backend/src/main/resources
run: echo "${{ secrets.APPLICATION_DB_YAML }}" > application-db.yml
- name: H2 스프링 설정 생성
run: |
echo "spring:
h2:
console:
enabled: true
path: /h2-console
datasource:
url: jdbc:h2:mem:database" > backend/src/main/resources/application.yml

- name: JDK 17 설정
uses: actions/setup-java@v4
Expand Down
3 changes: 2 additions & 1 deletion backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'

runtimeOnly 'com.mysql:mysql-connector-j:9.0.0'

runtimeOnly 'com.h2database:h2'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.rest-assured:rest-assured:5.5.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
Expand Down