Starlight.jl
Starlight.jl copied to clipboard
GitHub Action for unit tests
Running the test suite should be part of our CI/CD setup.
While I though initially that using a premade github action would be trivial, it's not here. There's a big problem with CI/CD of graphical libraries:
they need graphics.
The only option to run tests as they stand currently would be a self-hosted action on a machine that has both an alsa
sound device and a display that SDL recognizes.
It is certainly to separate tests for individual internal functions out into headless tests, but the meat and potatoes is going to have to be on a graphics capable computer.
As an extension to that, there could be graphical tests. This could include things like:
- Does the window pop up
- Is everything that's supposed to be in the window actually in the window
- Is this readable
- Select all images of cats (ok maybe not that one)
It's doable, but difficult. The test suite could get pretty annoying to click through that way too...
This is obviously much more difficult than I thought, thanks @AstroFloof for exploring this.
We can consider automating GUI tests with the self-hosted option using something like Squish, but...that really has nothing to do with getting the current test suite to run in CI/CD.
What needs to happen for this particular issue is for Starlight and/or Telescope and/or the tests themselves to be modified to run successfully in a headless environment.
Automated GUI tests can come later.
Given the existence of #25 maybe this can run headlessly, but it just doesn't run at all right now.
I don't think that issue is related to this one. At least I hope it isn't.
In any case there's no reason why SDL and Vulkan can't run headlessly, they have various features to support that use case, it's just a question of how to make it happen. Hence the increased bounty.
I'm taking immediate responsibility for this since it affects the contribution workflow so much. I'm going to make the necessary modifications to Telescope and take care of the GitHub workflows. The rest of you can take it easy wrt this issue.
Sounds good! I take it you pay yourself the bounty then? :P
Money saved is money earned, so ya pretty much. :)