Skip to content

Commit

Permalink
ci: flyway 검증 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ503 authored Nov 2, 2023
1 parent e4e01a6 commit 16ba4a9
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/backend_dev_flyway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,23 @@ jobs:
sleep 1
done
echo "$DATABASE_URL"
- name: Create flyway.conf
run: |
touch flyway.conf
echo "flyway.driver=com.mysql.cj.jdbc.Driver" >> flyway.conf
echo "flyway.url=mysql://127.0.0.1:7777/testdb" >> flyway.conf
echo "flyway.user=test" >> flyway.conf
echo "flyway.password=password" >> flyway.conf
echo "flyway.encoding=UTF-8" >> flyway.conf
echo "flyway.locations=filesystem:src/main/resources/db/migration" >> flyway.conf
echo "flyway.validateOnMigrate=true" >> flyway.conf
working-directory: ./backend/ddang

- name: flywayValidate
run: |
./gradlew -Dflyway.configFiles=flyway.conf flywayMigrate --stacktrace
working-directory: ./backend/ddang

- name: Shut down Docker Compose
run: docker-compose -f .github/docker-compose.yml down


# - name: Set up Docker Compose
# run: docker-compose -f .github/workflows/docker-compose.yml up -d

# - name: Create flyway.conf
# run: |
# touch flyway.conf
# echo "flyway.driver=com.mysql.cj.jdbc.Driver" >> flyway.conf
# echo "flyway.url=jdbc:mysql://127.0.0.1:7777/testdb" >> flyway.conf
# echo "flyway.user=test" >> flyway.conf
# echo "flyway.password=password" >> flyway.conf
# echo "flyway.encoding=UTF-8" >> flyway.conf
# echo "flyway.locations=filesystem:src/main/resources/db/migration" >> flyway.conf
# echo "flyway.validateOnMigrate=true" >> flyway.conf
# working-directory: ./backend/ddang

# - name: flywayValidate
# run: |
# ./gradlew -Dflyway.configFiles=flyway.conf flywayMigrate --stacktrace
# working-directory: ./backend/ddang

# - name: Stop MySQL
# run: docker stop mysql

0 comments on commit 16ba4a9

Please sign in to comment.