New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add: tests for CockroachDB #1869
base: main
Are you sure you want to change the base?
Conversation
Ah it seems the CI/CD has moved to Appveyor. I don't see a way to setup CockroachDB through the AppVeyor CI, although I do see configuration for Postgres and MYSQL. Any help there would be appreciated. |
@@ -23,6 +23,10 @@ jobs: | |||
POSTGRES_PASSWORD: postgres | |||
POSTGRES_DB: test | |||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |||
cockroachdb: | |||
image: timveil/cockroachdb-single-node:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try and use the official image here please - everything else looks good at a quick glance, but we'd want to rely on the official image in the builds.
@@ -38,8 +42,15 @@ jobs: | |||
MYSQL_ROOT_PASSWORD: root | |||
MYSQL_DATABASE: test | |||
steps: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with: | ||
dotnet-version: | | ||
3.1.x | ||
5.0.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dapper needs a lot of updating love we haven't had time for - this shouldn't be needed, but needs to be paired with a net6.0 update on test projects only (not changing core library targets). We can do that in this PR or separately.
This PR adds tests for CockroachDB. The tests are largely borrowed from the existing PostgreSQL tests to ensure basic functionality. Due to the way SERIAL primary keys work in CockroachDB some tests had to be removed because they were no longer deterministic.
The official CockroachDB docker image cockroachdb/cockroach#83749 has trouble starting in single node mode in Actions CI, so an alternate image had to be used.
Finally, I was running into issues with .NET framework versions missing for 3.x and 5.x so I modified the CI to include those versions.
You can see that the tests pass on my fork here:
https://github.com/dikshant/Dapper/actions/runs/3790538626/jobs/6445231573