mikependon / RepoDB

A hybrid ORM library for .NET.
Apache License 2.0
1.7k stars 125 forks source link

Run all tests in docker [X] #1191

Closed rhuijben closed 2 weeks ago

rhuijben commented 2 weeks ago

Add docker compose script to allow running all tests in one go on a system that has a docker client setup

$ .\test-docker.ps1

This will first download and setup docker images, and then connect these on localhost on non-standard ports and then run the test scripts against these instances.

I had to fix a few issues where multiple test projects assumed tables in the same schema to be in slightly different layouts. I fixed these by creating new database instances, assuming things are virtualized anyway.

This final patch (for now) builds on top of the previous set #1187, #1188, #1189, #1190 to get the tests passing.

rhuijben commented 2 weeks ago
Test summary: total: 1963; failed: 0; succeeded: 1963; skipped: 0; duration: 2,6s
Build succeeded in 3,3s
  RepoDb.MySql.UnitTests test net8.0 succeeded (0,9s)

Test summary: total: 176; failed: 0; succeeded: 176; skipped: 0; duration: 0,7s
Build succeeded in 1,3s
  RepoDb.MySqlConnector.UnitTests test net8.0 succeeded (0,8s)

Test summary: total: 176; failed: 0; succeeded: 176; skipped: 0; duration: 0,5s
Build succeeded in 1,2s
  RepoDb.PostgreSql.UnitTests test net8.0 succeeded (0,8s)

Test summary: total: 192; failed: 0; succeeded: 192; skipped: 0; duration: 0,6s
Build succeeded in 1,2s
  RepoDb.Sqlite.Microsoft.UnitTests test net8.0 succeeded (1,1s)

Test summary: total: 103; failed: 0; succeeded: 103; skipped: 0; duration: 1,0s
Build succeeded in 1,4s
  RepoDb.SQLite.System.UnitTests test net8.0 succeeded (1,1s)

Test summary: total: 103; failed: 0; succeeded: 103; skipped: 0; duration: 1,1s
Build succeeded in 1,5s
  RepoDb.SqlServer.UnitTests test net8.0 succeeded (0,8s)

Test summary: total: 195; failed: 0; succeeded: 195; skipped: 0; duration: 0,6s
Build succeeded in 1,2s
  RepoDb.IntegrationTests test net8.0 succeeded (200,3s)

Test summary: total: 2454; failed: 0; succeeded: 2454; skipped: 0; duration: 200,0s
Build succeeded in 200,8s
  RepoDb.MySql.IntegrationTests test net8.0 succeeded (97,3s)

Test summary: total: 532; failed: 0; succeeded: 532; skipped: 0; duration: 97,0s
Build succeeded in 97,7s
  RepoDb.MySqlConnector.IntegrationTests test net8.0 succeeded (89,6s)

Test summary: total: 552; failed: 0; succeeded: 552; skipped: 0; duration: 89,4s
Build succeeded in 90,1s
  RepoDb.PostgreSql.IntegrationTests test net8.0 succeeded (27,5s)

Test summary: total: 568; failed: 0; succeeded: 568; skipped: 0; duration: 27,2s
Build succeeded in 27,9s
  RepoDb.Sqlite.Microsoft.IntegrationTests test net8.0 succeeded (5,2s)

Test summary: total: 546; failed: 0; succeeded: 546; skipped: 0; duration: 5,0s
Build succeeded in 5,7s
  RepoDb.SQLite.System.IntegrationTests test net8.0 succeeded (7,0s)

Test summary: total: 546; failed: 0; succeeded: 546; skipped: 0; duration: 6,9s
rhuijben commented 2 weeks ago

Still draft PR as I'm still working on getting the bulk insert packages completing the tests too.

rhuijben commented 2 weeks ago

See also https://github.com/rhuijben/RepoDB/actions/runs/11784797009/job/32824702769

The github action works 👍