Repository navigation
Implement initial test runner / CI build test - #13
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an initial automated test harness for NImpeller, including a headless software-GL renderer for deterministic golden-image regression tests, and wires it into GitHub Actions CI on Ubuntu.
Changes:
- Introduces a new
tests/NImpeller.TestsxUnit v3 test project with unit tests plus headless GL-based rendering/golden tests. - Adds a deterministic “golden scenes” suite and baseline image storage/compare utilities.
- Adds a CI workflow to install Mesa/llvmpipe + SDL deps, generate bindings, and run tests under Xvfb.
Reviewed changes
Copilot reviewed 20 out of 44 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/NImpeller.Tests/Unit/StructHelperTests.cs | Adds unit tests for struct helpers and conversions. |
| tests/NImpeller.Tests/Unit/PathBuilderTests.cs | Adds unit tests for path builder APIs. |
| tests/NImpeller.Tests/Unit/LifetimeTests.cs | Adds lifetime/idempotent dispose tests for wrappers. |
| tests/NImpeller.Tests/Unit/BuilderStateTests.cs | Adds tests for builder save/restore and display list creation. |
| tests/NImpeller.Tests/TextureInteropTests.cs | Adds a GL texture interop golden test. |
| tests/NImpeller.Tests/test.runsettings | Forces software GL (llvmpipe) via environment variables for test runs. |
| tests/NImpeller.Tests/Scenes/IScene.cs | Defines scene interface and render parameters for golden tests. |
| tests/NImpeller.Tests/Scenes/GoldenScenes.cs | Implements deterministic scenes used for golden-image regression. |
| tests/NImpeller.Tests/RenderGate.cs | Gates render tests based on availability and CI/local behavior. |
| tests/NImpeller.Tests/NImpeller.Tests.csproj | Adds the new test project and dependencies (xUnit v3, Silk.NET, runsettings). |
| tests/NImpeller.Tests/Impeller.targets | Copies the correct native Impeller library into test output. |
| tests/NImpeller.Tests/Headless/RawImage.cs | Implements raw image storage/comparison and PNG output for diagnostics. |
| tests/NImpeller.Tests/Headless/ImpellerGLFixture.cs | Provides a shared GL fixture for tests and scene rendering. |
| tests/NImpeller.Tests/Headless/HeadlessImpellerContext.cs | Implements a thread-affine headless SDL+GLES context, offscreen rendering, and readback. |
| tests/NImpeller.Tests/Goldens/.gitkeep | Documents committed golden baseline storage and update flow. |
| tests/NImpeller.Tests/GoldenImageTests.cs | Implements the golden-image test runner and baseline update logic. |
| tests/NImpeller.Tests/AssemblyInfo.cs | Disables test parallelization due to shared thread-affine GL context. |
| README.md | Documents how to run the test suite locally. |
| NImpeller.sln | Adds the test project to the solution. |
| .github/workflows/tests.yml | Adds Ubuntu CI job to install deps, generate bindings, and run tests under Xvfb. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an initial test runner and CI test workflow for NImpeller