sentry-unity
sentry-unity copied to clipboard
Additional validation of package created in CI
We often have CI passing when the resulting package is actually broken. In fact, we've released packages to getsentry/unity that had missing dependencies.
Resolving this issue is likely to require multiple steps done through mulitiple PRs.
Validations to issues we've had in the past include. We can tackle them starting from the high-impact and low-effort.
- [x] The package can be imported on a Unity project created by the Unity version we're testing against
- [ ] No errors or warnings caused by adding the package to the project
- [ ] No errors (warning is OK) if the game is played before Sentry is configured
- [ ] Verify that updating from Sentry Unity UPM to the built package results in no errors or warnings (to be clear, this doesn't validate jumping from any version to any version will be OK).
Possibly, all the E2E and Smoke Test jobs could be done on the project created for the Unity version under test, with the created package. So that all validations are done on the package+Unity version we are building against. See #449
For checks that would fail on breaking changes (e.g: create console warnings) consider having as a standalone job so we can mark as not-required and merge when failed.
#440 introduced snapshot validation of the package contents
Using the current Smoke Test will not validate the native integration works. We need to build this in a way that the SentryOptions scriptable object is added to the project after we add the package, simulating what the editor integration would do. The can also write a SentryCliOptions using a local server that checks files were uploaded. This can be a simple CLI that verifies some connection came through and files were uploaded.
One way for us to allow programatic configuration, at first for testing but possible as a public API is to expose a public, static SentryOptions property that is used as a base configuration even if Sentry is configured through the editor.
According to this we could rely on a static constructor to run some code that configures these GlobalSentryOptions and Sentry SDK internally can use that instance to Init the SDK (after applying values from the scriptable object).
This would allow us to have the Smoke Test code work with initializing the SDK with the scriptable objects and have native support for iOS and Android.