FirebirdSQL / php-firebird

Firebird PHP driver
Other
66 stars 15 forks source link

Add CI and fix/disable broken tests #39

Closed Jon4t4n closed 1 year ago

Jon4t4n commented 1 year ago

While I was investigating some crashes that we have been observing in production, I noticed the following:

  1. The driver does not work when compiled with --enable-debug.
  2. Tests seem broken, at least with PHP 7.3 and newer.

Also, it would be nice if we could take advantage of GitHub Actions to ensure that fixes work across multiple PHP versions (and firebird versions).

This PR is a first attempt at adding some basic GitHub Actions that build the driver on Linux (release and debug) and runs the test suite. The majority of the tests are now passing, but some of the tests have been disabled. I intend to file issues for the tests that have been disabled and land fixes for them in follow-up patches.

It feels like the tests have been broken for a while, and thus it would be acceptable to disable the tests that did not have an easy fix. If I am wrong and all the tests should pass, please let me know.

Currently, PHP 7.4, 8.0, 8.1, and 8.2 are covered by CI. I don't know what versions we are trying to support. I would be okay if we completely dropped 7.4 and only have 8.x in CI.

Jon4t4n commented 1 year ago

I guess the actions won't run until this is merged. Adding a link to the latest CI run in my fork. https://github.com/Jon4t4n/php-firebird/actions/runs/3787871209

MartinKoeditz commented 1 year ago

Looks good. I will check your work for backward probs. If it's ok I will merge it soon.

Thank you very much.

Jon4t4n commented 1 year ago

Created issues that track the tests that get disabled by this PR. I will update comments/text in the code that refers to GH issues later today, so please wait with the merge until that is done.

Jon4t4n commented 1 year ago

I will update comments/text in the code that refers to GH issues later today, so please wait with the merge until that is done.

Done.

MartinKoeditz commented 1 year ago

Thank you. I'll run some tests over the weekend and publish your work.