Skip to content

Commit e612cb5

Browse files
committed
enable postgres
1 parent b8cca04 commit e612cb5

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

.github/workflows/dotnetpull.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ jobs:
2323
--health-timeout=5s
2424
--health-retries=10
2525
26+
postgres:
27+
image: postgres:13
28+
ports:
29+
- 5432:5432
30+
env:
31+
POSTGRES_USER: testuser
32+
POSTGRES_PASSWORD: testpass
33+
POSTGRES_DB: testdb
34+
options: >-
35+
--health-cmd="pg_isready -U testuser"
36+
--health-interval=10s
37+
--health-timeout=5s
38+
--health-retries=5
39+
2640
steps:
2741
- uses: actions/checkout@v4
2842
- name: Setup .NET
@@ -38,7 +52,11 @@ jobs:
3852
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools unixodbc-dev
3953
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
4054
source ~/.bashrc
41-
- name: Create database
55+
- name: Install PostgreSQL client tools
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y postgresql-client
59+
- name: Create SQLServer database
4260
run: |
4361
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q "CREATE DATABASE [Whatever];"
4462
- name: Restore dependencies

src/Migrator.Tests/appsettings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
"Id": "SQLServer",
99
"ConnectionString": "Data Source=localhost;Initial Catalog=Whatever;user=sa;pwd=YourStrong@Passw0rd;encrypt=false"
1010
},
11-
/*
1211
{
13-
"Id": "PostgreSQL",
14-
"ConnectionString": "Server=localhost;Port=5432;Database=dev;User Id=xxx;Password=xxx;"
12+
"Id": "PostgreSQL",
13+
"ConnectionString": "Server=localhost;Port=5432;Database=testdb;User Id=testuser;Password=testpass;"
1514
},
15+
/*
1616
{
1717
"Id": "Oracle",
1818
"ConnectionString": "Data Source=localhost:1521/xxx;User Id=xxx;Password=xxx"
1919
}
20-
*/
20+
*/
2121
]
2222
}

0 commit comments

Comments
 (0)