Skip to content

Commit

Permalink
ci: mysql service 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonyj1022 authored Nov 2, 2023
1 parent 338352d commit c0833f8
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/backend_dev_flyway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,31 @@ name: dev flyway 검증
on:
pull_request:
types: [opened, reopened, synchronize]
branches: [ develop-be ]
branches: [develop-be]

permissions: write-all



jobs:
build:
if: contains(github.event.pull_request.labels.*.name, 'backend')
runs-on: ubuntu-latest
services:
mysql:
image: mysql:latest
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testdb
MYSQL_USER: test
MYSQL_PASSWORD: password
ports:
- 7777:3306
steps:
- uses: actions/checkout@v3
- name: settings java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
host port: 7777
container port: 3306
mysql database: testdb
mysql user: 'test'
mysql password: 'password'
- name: Wait for MySQL to start
run: sleep 10
- name: Check MySQL Connection
run: |
mysql -h localhost -P 7777 -u test -ppassword -e "SELECT 1"
- name: cache gradle
uses: actions/cache@v2
with:
Expand All @@ -56,7 +51,6 @@ jobs:
echo "flyway.locations=filesystem:src/main/resources/db/migration" >> flyway.conf
echo "flyway.validateOnMigrate=true" >> flyway.conf
working-directory: ./backend/ddang


- name: flywayValidate
run: |
Expand Down

0 comments on commit c0833f8

Please sign in to comment.