Add PostgreSQL tests into GitHub action workflow. Fix a few breaking changes in PostgreSQL driver #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests with PostgreSQL | |
on: | |
pull_request: | |
branches: [ master-servicetitan ] | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: "true" | |
DO_CONFIG_FILE: "/tmp/do-test.cfg" | |
DO_STORAGE: "pgsql160" | |
DO_TargetFrameworks: net8.0 | |
jobs: | |
test-with-postgresql: | |
name: SQL tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: { dotnet-version: 8 } | |
- name: Build | |
run: dotnet build -v q Orm.sln | |
- uses: ikalnytskyi/action-setup-postgres@v6 | |
- name: Init Test DB | |
run: | | |
echo 127.0.0.1 pghost >>/etc/hosts | |
createuser dotest | |
createdb --owner dotest dotest | |
psql -c "ALTER USER dotest WITH PASSWORD 'dotest' SUPERUSER" | |
- name: Create DO Tests Config file | |
run: echo default=postgresql://dotest:dotest@localhost/dotest >$DO_CONFIG_FILE | |
- name: Tests | |
run: dotnet test --no-build -v n Orm/Xtensive.Orm.Tests.Sql/Xtensive.Orm.Tests.Sql.csproj --filter 'TestCategory!=Mute' | |