Skip to content
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

test(mssql): add support for running tests against ms sql server #91

Merged

Conversation

DaveHint
Copy link
Contributor

@DaveHint DaveHint commented Jul 2, 2024

I'd like to start to use spatial data with doctrine in one of my projects I'm working on, but unfortunately it uses Microsoft SQL Server. It would be great if doctrine-spatial could support it.

Therefore, I'd like to contribute a potential starting point for MSSQL support:

  • scaffold phpunit test suites for MSSQL Server
  • add docker compose services for MSSQL Server
  • create the test database main when MSSQL Server starts
  • install PDO drivers for MSSQL Server in php8 service
  • configure SqlServerPlatform as supported platform in OrmTestCase
  • add additional database driver options when building the connection parameters to trust the sql server's self signed certificate
  • add test commands to composer.json

Feedback is welcome

@DaveHint DaveHint had a problem deploying to Test environment July 4, 2024 12:43 — with GitHub Actions Failure
@Alexandre-T
Copy link
Contributor

Many thanks for your pull request! I'm really excited about this contribution. In my opinion, MSSQL Server is an excellent database engine, and I'm thrilled about the prospect of extending doctrine-spatial to support it.

I'll review your code as soon as possible. I'm on vacation next week, so I'm not sure how much time I'll have to work on it, but I'll get back to you as soon as I can.

@Alexandre-T
Copy link
Contributor

Alexandre-T commented Jul 4, 2024

Here's my initial feedback (though it's incomplete).

The tests are failing due to a minor issue. The phpunit.*.xml files located in the docker directory are intended for developer assistance. However, the CI process utilizes the phpunit.*.xml files within the .github directory. To resolve this, you'll need to duplicate the files from the docker directory to the .github directory and update them to include the necessary host, port, user and password credentials. (here is the line of the CI)

Additionally, the CI configuration defined in the.github/workflow/full.yaml file should be updated to set up three separate MS-SQL containers (three services), each representing a different version.

edit: I just find this action to help you to create the services: https://github.com/marketplace/actions/mssql-suite

I am grateful for your valuable pull request! Thank you so much!

@Alexandre-T Alexandre-T changed the base branch from main to mssql-feature July 7, 2024 13:31
@DaveHint DaveHint had a problem deploying to Test environment July 7, 2024 13:32 — with GitHub Actions Failure
@Alexandre-T Alexandre-T changed the base branch from mssql-feature to main July 7, 2024 13:34
@Alexandre-T Alexandre-T changed the base branch from main to mssql-feature July 7, 2024 13:47
@DaveHint DaveHint had a problem deploying to Test environment July 7, 2024 13:48 — with GitHub Actions Failure
@Alexandre-T Alexandre-T changed the base branch from mssql-feature to main July 7, 2024 13:50
@DaveHint DaveHint had a problem deploying to Test environment July 7, 2024 13:52 — with GitHub Actions Failure
@Alexandre-T Alexandre-T self-requested a review July 7, 2024 13:55
@Alexandre-T Alexandre-T changed the base branch from main to mssql-feature July 7, 2024 13:58
@Alexandre-T Alexandre-T merged commit 23802a1 into longitude-one:mssql-feature Jul 7, 2024
2 of 3 checks passed
@Alexandre-T Alexandre-T self-assigned this Jul 8, 2024
@Alexandre-T Alexandre-T added the enhancement New feature or request label Jul 8, 2024
Alexandre-T added a commit that referenced this pull request Jul 8, 2024
#94)

* test(mssql): add support for running tests against ms sql server (#91)
* Create 2017, 2019 and 2022 sqlserver in CI
* Quality rules applied
---------

Co-authored-by: DaveHint <[email protected]>
Alexandre-T added a commit that referenced this pull request Jul 8, 2024
Alexandre-T added a commit that referenced this pull request Jul 8, 2024
@DaveHint DaveHint deleted the test-add-mssql-test-env branch July 10, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants