Skip to content

Commit

Permalink
ci: docker를 실행하는 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ503 authored Nov 2, 2023
1 parent 742404f commit 4eee187
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/backend_dev_flyway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@ jobs:
MYSQL_PASSWORD: password
ports:
- 7777:3306

steps:
- uses: actions/checkout@v3

- name: Start Docker Compose
run: docker-compose up -d

- name: Check MySQL Connection
run: |
mysql -h localhost -P 7777 -u test -ppassword -e "SELECT 1"
- name: settings java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: cache gradle
uses: actions/cache@v2
with:
Expand All @@ -40,6 +47,7 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: chmod gradle
run: chmod +x backend/ddang/gradlew

Expand All @@ -60,3 +68,7 @@ jobs:
./gradlew -Dflyway.configFiles=flyway.conf flywayMigrate --stacktrace
./gradlew -Dflyway.configFiles=flyway.conf flywayValidate --stacktrace
working-directory: ./backend/ddang

- name: Stop Docker Compose
run: docker-compose down

0 comments on commit 4eee187

Please sign in to comment.