parent
26a81be456
commit
ecd8b0020e
@ -2,6 +2,13 @@ name: Unit tests
|
|||||||
run-name: ${{ gitea.actor }} is testing
|
run-name: ${{ gitea.actor }} is testing
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
|
env:
|
||||||
|
registry: my_registry_name
|
||||||
|
# Not sure these are actually being passed down to rails, set them as the default in database.yml
|
||||||
|
DB_HOST: localhost
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_PASSWORD: postgres
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -14,8 +21,6 @@ jobs:
|
|||||||
image: postgres
|
image: postgres
|
||||||
# Provide the password for postgres
|
# Provide the password for postgres
|
||||||
env:
|
env:
|
||||||
POSTGRES_HOST: postgres
|
|
||||||
POSTGRES_DB: persistence
|
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
# Set health checks to wait until postgres has started
|
# Set health checks to wait until postgres has started
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"DbConnection": {
|
"DbConnection": {
|
||||||
"Host": "postgres",
|
"Host": "localhost",
|
||||||
"Port": 5442,
|
"Port": 5442,
|
||||||
"Username": "postgres",
|
"Username": "postgres",
|
||||||
"Password": "postgres"
|
"Password": "postgres"
|
||||||
|
@ -24,8 +24,8 @@ public class WebAppFactoryFixture : WebApplicationFactory<Program>
|
|||||||
config.AddJsonFile("appsettings.Tests.json");
|
config.AddJsonFile("appsettings.Tests.json");
|
||||||
|
|
||||||
var dbConnection = config.Build().GetSection("DbConnection").Get<DbConnection>()!;
|
var dbConnection = config.Build().GetSection("DbConnection").Get<DbConnection>()!;
|
||||||
//connectionString = dbConnection.GetConnectionString();
|
connectionString = dbConnection.GetConnectionString();
|
||||||
connectionString = "Host=postgres;Port=5442;Username=postgres;Password=postgres;Database=persistence";
|
//connectionString = "Host=postgres;Port=5442;Username=postgres;Password=postgres;Database=persistence";
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.ConfigureServices(services =>
|
builder.ConfigureServices(services =>
|
||||||
|
Loading…
Reference in New Issue
Block a user