Skip to content

Commit

Permalink
パイプラインにデータベース作成処理を追加。
Browse files Browse the repository at this point in the history
  • Loading branch information
fkoyama committed Nov 6, 2023
1 parent 9712700 commit 9622a9d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/samples-dressca-backend.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
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;'"
- id: run-tests
name: テストの実行
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
{
options.UseNpgsql("Host=localhost;Database=dressca_eshop;Username=postgres;Password=postgres");
});

var dbContext = services.BuildServiceProvider().GetRequiredService<DresscaDbContext>();
dbContext.Database.EnsureCreated();
});

builder.UseEnvironment("Development");
Expand Down

0 comments on commit 9622a9d

Please sign in to comment.