Use the configuration depending on the selected database provider #13

Merged
Wesser merged 33 commits from feat/database-persistence into feat/add-setup 2024-06-01 05:45:18 +03:00
Showing only changes of commit b67f0a82ed - Show all commits

View File

@ -25,7 +25,7 @@ jobs:
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
- 5555:3306
postgres:
image: postgres:latest
@ -39,7 +39,7 @@ jobs:
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
- 6666:5432
steps:
- uses: actions/checkout@v4
@ -66,12 +66,12 @@ jobs:
- name: Modify configuration for MySQL
if: matrix.db-provider == 'mysql'
run: |
jq '.DbSettings.TypeDatabase = 0 | .DbSettings.ConnectionStringSql = "Server=127.0.0.1;Port=3306;Database=testdb;Uid=root;Pwd=root;"' Settings.json > temp.json && mv temp.json Settings.json
jq '.DbSettings.TypeDatabase = 0 | .DbSettings.ConnectionStringSql = "Server=127.0.0.1;Port=5555;Database=testdb;Uid=root;Pwd=root;"' Settings.json > temp.json && mv temp.json Settings.json
- name: Modify configuration for PostgreSQL
if: matrix.db-provider == 'postgresql'
run: |
jq '.DbSettings.TypeDatabase = 2 | .DbSettings.ConnectionStringSql = "Host=127.0.0.1;Port=5432;Database=testdb;Username=postgres;Password=postgres"' Settings.json > temp.json && mv temp.json Settings.json
jq '.DbSettings.TypeDatabase = 2 | .DbSettings.ConnectionStringSql = "Host=127.0.0.1;Port=6666;Database=testdb;Username=postgres;Password=postgres"' Settings.json > temp.json && mv temp.json Settings.json
- name: Run tests
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal