From b55e3efbbda79daa50107903e18234fa18f05348 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 25 Jan 2024 15:54:01 +0100 Subject: [PATCH] fix: better to connect db before to sync schema --- .github/workflows/build.yml | 12 ++++++------ .github/workflows/release.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20d12e7..964e613 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,12 +16,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18.19.0' - - name: Setup MySQL server - uses: mirromutth/mysql-action@v1.1 - with: - mysql version: '5.7' - mysql database: 'typeplate_test' - mysql root password: passw0rd - name: Create directories run: mkdir -p ./dist/env && cp ./src/env/template.env ./dist/env/test.env - name: Setup .env file @@ -72,6 +66,12 @@ jobs: with: name: build-files path: dist + - name: Setup MySQL server + uses: mirromutth/mysql-action@v1.1 + with: + mysql version: '5.7' + mysql database: 'typeplate_test' + mysql root password: passw0rd - name: Synchronize database schema run: typeorm schema:sync - name: Execute tests suites diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb49593..6e93c48 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,12 +17,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: '18.19.0' - - name: Setup MySQL server - uses: mirromutth/mysql-action@v1.1 - with: - mysql version: '5.7' - mysql database: 'typeplate_test' - mysql root password: passw0rd - name: Create directories run: mkdir -p ./dist/env && cp ./src/env/template.env ./dist/env/test.env - name: Setup .env file @@ -73,6 +67,12 @@ jobs: with: name: build-files path: dist + - name: Setup MySQL server + uses: mirromutth/mysql-action@v1.1 + with: + mysql version: '5.7' + mysql database: 'typeplate_test' + mysql root password: passw0rd - name: Synchronize database schema run: typeorm schema:sync - name: Execute tests suites