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