From 1f09f69342e135ae625cc1db601fa362fa7c110d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=9C=EC=9D=B4=EB=AF=B8?= <63184334+JJ503@users.noreply.github.com> Date: Thu, 2 Nov 2023 06:37:34 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=EC=84=9C=EB=B9=84=EC=8A=A4=EB=A5=BC=20?= =?UTF-8?q?=ED=86=B5=ED=95=B4=20mysql=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend_flyway.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/backend_flyway.yml b/.github/workflows/backend_flyway.yml index aed0291c9..cd74a17f4 100644 --- a/.github/workflows/backend_flyway.yml +++ b/.github/workflows/backend_flyway.yml @@ -12,6 +12,17 @@ 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 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v3 @@ -35,9 +46,6 @@ jobs: - name: chmod gradle run: chmod +x backend/ddang/gradlew - - name: Set up Docker Compose - run: docker-compose -f .github/workflows/docker-compose.yml up -d - - name: Wait for MySQL to be ready run: | while [ -z "$DATABASE_URL" ]; do @@ -62,6 +70,3 @@ jobs: run: | ./gradlew -Dflyway.configFiles=flyway.conf flywayMigrate --stacktrace working-directory: ./backend/ddang - - - name: Shut down Docker Compose - run: docker-compose -f .github/workflows/docker-compose.yml down