From 8d48202779beefbd60e0b6d21ced21e7ebf52e9a Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 2 Oct 2021 22:00:30 +0200 Subject: [PATCH 1/2] removed test database creation from database prepare --- database/src/prepare.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/database/src/prepare.ts b/database/src/prepare.ts index fda4b4e13..440289aea 100644 --- a/database/src/prepare.ts +++ b/database/src/prepare.ts @@ -25,12 +25,6 @@ export default async (): Promise => { DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;`) - // Create Database `gradido_community_test` for tests - await con.query(` - CREATE DATABASE IF NOT EXISTS ${CONFIG.DB_DATABASE}_test - DEFAULT CHARACTER SET utf8mb4 - DEFAULT COLLATE utf8mb4_unicode_ci;`) - // Check if old migration table is present, delete if needed const [rows] = await con.query(`SHOW TABLES FROM \`${CONFIG.DB_DATABASE}\` LIKE 'migrations';`) if ((rows).length > 0) { From 413c54ee41d5f77a77407111849003d8baaa4f95 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 2 Oct 2021 22:00:57 +0200 Subject: [PATCH 2/2] define DB_DATABASE name in workflow for community test run --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a05426844..4c9918e23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -470,7 +470,7 @@ jobs: run: echo "::set-output name=id::$(docker network ls | grep github_network | awk '{ print $1 }')" id: network - name: Start database migration - run: docker run --network ${{ steps.network.outputs.id }} --name=database --env NODE_ENV=production --env DB_HOST=mariadb -d gradido/database:production_up + run: docker run --network ${{ steps.network.outputs.id }} --name=database --env NODE_ENV=production --env DB_HOST=mariadb --env DB_DATABASE=gradido_community_test -d gradido/database:production_up - name: get database migration container id run: echo "::set-output name=id::$(docker container ls | grep database | awk '{ print $1 }')" id: database_container