From d15d0fdecf235262018635943f9da50a7bca8bc4 Mon Sep 17 00:00:00 2001 From: Fumika Koyama Date: Mon, 6 Nov 2023 13:39:27 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B5=90=E5=90=88=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=AEDB=E6=8E=A5=E7=B6=9A=E7=A2=BA=E8=AA=8D=E3=80=82(MySQL)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/samples-dressca-backend.ci.yml | 10 +++++----- .../Dressca/dressca-backend/Directory.Packages.props | 1 + .../CustomWebApplicationFactory.cs | 2 +- .../Dressca.IntegrationTest.csproj | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/samples-dressca-backend.ci.yml b/.github/workflows/samples-dressca-backend.ci.yml index 827cd463a..f021f95e8 100644 --- a/.github/workflows/samples-dressca-backend.ci.yml +++ b/.github/workflows/samples-dressca-backend.ci.yml @@ -58,13 +58,13 @@ jobs: echo '# Build Result :gear:' >> $GITHUB_STEP_SUMMARY cat build-result.txt | sed -n -e 's/^/> /p' >> $GITHUB_STEP_SUMMARY - - name: 結合テスト用 PostgreSQL のセットアップ + - name: 結合テスト用 MySQL のセットアップ shell: bash run: | - sudo systemctl start postgresql.service - sudo bash -c "echo \"local all all md5\" >> /etc/postgresql/14/main/pg_hba.conf" - sudo su postgres -c "psql postgres -c \"alter role postgres with login password 'postgres';\"" - sudo su postgres -c "psql postgres -c 'create database dressca_eshop;'" + sudo systemctl start mysql.service + sudo mysql -u root -p + root + create database dressca_eshop; - id: run-tests name: テストの実行 diff --git a/samples/Dressca/dressca-backend/Directory.Packages.props b/samples/Dressca/dressca-backend/Directory.Packages.props index ce07bfe0a..822e59f3b 100644 --- a/samples/Dressca/dressca-backend/Directory.Packages.props +++ b/samples/Dressca/dressca-backend/Directory.Packages.props @@ -16,6 +16,7 @@ + diff --git a/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/CustomWebApplicationFactory.cs b/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/CustomWebApplicationFactory.cs index 5e496d91f..ff32abbdf 100644 --- a/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/CustomWebApplicationFactory.cs +++ b/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/CustomWebApplicationFactory.cs @@ -27,7 +27,7 @@ protected override void ConfigureWebHost(IWebHostBuilder builder) services.AddDbContext( options => { - options.UseNpgsql("Host=localhost;Database=dressca_eshop;Username=postgres;Password=postgres"); + options.UseMySql("server=localhost;user=root;password=root;database=dressca_eshop;",new MySqlServerVersion(new Version(8,0,34))); }); }); diff --git a/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/Dressca.IntegrationTest.csproj b/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/Dressca.IntegrationTest.csproj index c14a1dc33..2910e4a43 100644 --- a/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/Dressca.IntegrationTest.csproj +++ b/samples/Dressca/dressca-backend/tests/Dressca.IntegrationTest/Dressca.IntegrationTest.csproj @@ -13,6 +13,7 @@ + runtime; build; native; contentfiles; analyzers; buildtransitive