Skip to content

Move and expand editor tests, and avoid duplicate CI - #112

Merged
mackysoft merged 7 commits into
mainfrom
refactor/tests-outside-package
Oct 15, 2026
Merged

mackysoft merged 7 commits into
mainfrom
refactor/tests-outside-package

Conversation

@mackysoft

@mackysoft mackysoft commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Keep development tests outside the UPM source and unitypackage export, and expand the EditMode suite to cover published managed-reference behavior. Run the Tests workflow on pull requests and pushes to main, so an update to a pull request branch starts a single EditMode matrix.

Scope

  • Move the existing test assembly, fixtures, helpers, and metadata to Assets/Tests/SerializeReferenceExtensions, preserving asset GUIDs and assembly identity. Document the development test location and distribution boundary in AGENTS.md.
  • Include the coverage work merged from Cover published managed-reference behavior with specification tests #114: managed-reference selection, Inspector labels, subtype drawers, reset operations, and type-candidate contracts. Run graphics-dependent Inspector tests under Xvfb with software OpenGL on Linux.
  • Restrict the Tests workflow's push trigger to main. Retain pull request and manual triggers, the Assets/** change filter, the Linux Unity 2021.3.45f2 / 2023.2.22f1 matrix, and the final Verification gate.

Two value-type variance reproductions from #114 remain Explicit because they expose an existing product defect on Unity 2023.2. They preserve the exclusion assertion and are skipped by the continuous suite pending a separate product fix.

Verification

  • At relocation commit ea3045f, all 22 moved files were byte-identical to the base, including metadata; existing GUIDs and assembly references were preserved. The later test additions and changes are described in Cover published managed-reference behavior with specification tests #114.
  • Exported a local unitypackage through the existing UnityPackageExporter.Export method and inspected all 23 asset paths and archive contents: no tests, fixtures, helper scripts, or test assembly. After integrating main, checked that all tests remain outside both distribution roots and that production code and the exporter match main.
  • Parsed the workflow YAML and confirmed the main push restriction and retained pull request / manual triggers. Independent review found no actionable defects in the relocation or trigger change; the specification-test review and limitations are recorded in Cover published managed-reference behavior with specification tests #114.
  • Trigger-change commit 88cd071 produced exactly one Tests workflow run (pull_request) and passed both Linux EditMode versions and Verification.
  • Integrated current main (f8c8ed6, including Fix Inspector updates after SubclassSelector type changes #113) and moved its newly added Inspector change-check test and metadata outside the package without changing their contents or GUID. All 24 pre-existing main test files now reside in the development test tree. Production code and the exporter match current main.
  • Latest-head Linux CI after integrating main: Unity 2021.3.45f2 76 passed; Unity 2023.2.22f1 82 passed, 2 explicit known-defect reproductions skipped; 0 failures. Both XML artifacts were checked, including all three relocated ChangeCheck cases passing on both versions. Final Verification succeeded.
  • Independent review of the integrated main changes and test relocation found no additional actionable defects.

References

Why
Keep development tests out of both UPM and unitypackage distributions.

What Changed
Move the existing test assembly and fixtures to Assets/Tests/SerializeReferenceExtensions, preserving their contents and GUIDs. Document the development test location and distribution boundary.

Impact
The development project and existing Linux EditMode matrix still discover the same tests. Runtime and Editor package code are unchanged.
Why
Published selection, label, drawer and reset behavior lacked regression tests.

What Changed
Exercise public selection APIs and registered Inspector and menu operations.
Cover inheritance and generic candidate gaps, and map tests to contract sources.
Keep two value-type variance defect reproductions explicit until a product fix.

Impact
Editor behavior is checked without fixing private package implementation details.
Existing clipboard tests and all product code remain unchanged.
Why
Rendered labels and real popup input require a graphics-capable Editor view.

What Changed
Run both Linux EditMode versions under Xvfb with software OpenGL.
Document graphics requirements and the contract-to-test map.

Impact
Inspector regressions participate in the normal Verification gate.
Player builds and package exports remain in the Release workflow.
Why
A separate test inventory duplicates the executable tests and drifts over time.

What Changed
Remove Documentation/Tests.md and its AGENTS.md reference.

Impact
Test coverage and execution stay defined by the tests and CI configuration.
Why
Avoid duplicate Tests workflow runs when a branch with an open pull request receives a push.

What Changed
Restrict the push trigger to main while retaining pull_request and workflow_dispatch triggers.

Impact
Pull request updates run one Linux EditMode matrix. Main pushes and manual runs remain available.
@mackysoft mackysoft changed the title Move editor tests outside package distributions Exclude editor tests from distributions and avoid duplicate CI Oct 15, 2026
Cover published managed-reference behavior with specification tests
@mackysoft mackysoft changed the title Exclude editor tests from distributions and avoid duplicate CI Move and expand editor tests, and avoid duplicate CI Oct 15, 2026
Why
Include the current main branch without distributing the newly added development tests.

What Changed
Preserve the upstream Inspector change-notification fix and move its test and metadata to Assets/Tests/SerializeReferenceExtensions/Editor. Consolidate the graphics test instructions.

Impact
The combined EditMode suite covers the upstream fix while both package distribution roots remain free of test code.
@mackysoft
mackysoft merged commit 39e2be0 into main Oct 15, 2026
4 checks passed
@mackysoft
mackysoft deleted the refactor/tests-outside-package branch October 15, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant