-
Notifications
You must be signed in to change notification settings - Fork 40
feat: add Laravel integration test matrix #115
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
Conversation
This is the basic operation: stand up the framework, configure Rollbar within that framework, then invoke a log message. Rig Rollbar so that logged messages get written to a file, that we then check exists and contains the desired value. Later iterations will add the specifics for each framework-version, which may require multiple action files: the setup varies slightly between framework and framework-version.
Never store secrets. Also, by pushing the secret definition into the runner, we have more flexibility for choosing their value based on branch conditions (eg, for testing certain behaviors of various tokens).
The [docs][1] call for `4.*` and `2.*`, so we'll use those to align with the exact documentation. [1]:https://docs.rollbar.com/docs/laravel
Now we'll add them in one at a time, excluding or fixing the bad combo.
Covers Laravel 5.6 through 8, on the appropriate PHP versions from the 7.x series. Comments out a known failing combination of Laravel 5.5 and doesn't include the unlikely to work PHP 8 support.
Hunting down why failing on GitHub action but not local `act`.
The runner is removing leading zeroes, setting the value to '0'.
This failed locally, but it may have been a false negative.
Now that we've proved out the support (from prior runs where the matrix encompassed all supported versions and was hitting released tags) and we have a baseline of known support, we can break out the code into lineage branches. In this regime (which matches rollbar-php operation), commits to the lineage branch are checked against the documented support for that lineage.
Why PHP v8 is not supported in the test matrix? |
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.
From Bishop
all work committed on the laravel-test-matrix branch. Laravel, Lumen, and Laravel Zero covered for currently working version combinations. Additional PR are needed to align actual working behavior with documented and expected behavior.
@bishopb Can you please track the details of the expected behavior in a new ticket and we will merge this PR as complete? Thanks
Description of the change
We integrate with Laravel versions 5.5+. The existing tests verify unit functionality with TestBench but has a few caveats. First, it tests the package against the latest version of Laravel on the PHP engine running the test. Second, as written, there was no version constraint for testbench 3, which is the only way to get Laravel 5 tests. Third, the tests do not perform an end to end test of actual logging within a Laravel application. Finally, the tests do not cover Laravel Zero or Lumen (or Nova, for that matter).
The drawback with this architecture is that changes meant to be backwards compatible could only be verified by manually changing composer JSON and, in the case of PHP engine compatibility, by running with engine alternatives. Additionally, if the package had side effects during its logging operation (such as raising a warning), these would not be noticed by the unit tests.
Combined, these drawbacks make forward progress difficult, because they leave dark many potential in-the-field corners we want to see.
This PR adds a Laravel test matrix that covers Laravel 5.5 through Laravel 8 and on supported underlying PHP versions, coordinated to work with the legacy lineages.
Type of change
Related issues
Checklists
Development
Code review