Skip to content

CI: migrate to per-Unity-version test projects (Unity-Tests/<version>/) #45

Description

@IvanMurzak

Background

CI currently runs the whole Unity version matrix (2019.4 → 6000.0, editmode/playmode, base/windows-mono) against a single Unity-Package/ project with one Packages/manifest.json.

This is fragile: any dependency that isn't compatible with the oldest editor in the matrix breaks every older-version job at compile time, before a single test runs. We just hit exactly this — a stray com.ivanmurzak.unity.mcp + com.unity.ai.navigation in the manifest failed to compile on Unity < 2022.3, taking down all 2019/2020/2021 jobs (fixed in #44 / commit e76a0a5 by restoring the clean manifest).

Goal

Adopt the more robust structure used by the sibling repo IvanMurzak/Unity-AI-Animation: a separate, self-contained test project per Unity version, each with its own manifest pinned to packages compatible with that editor.

Unity-Tests/
  2019.4.40f1/Packages/manifest.json
  2020.3.48f1/Packages/manifest.json
  2021.3.45f1/Packages/manifest.json
  ...

Each test project references the library under test via a local file: dependency pointing at Unity-Package/Assets/root (or a Packages/ embed), so the shipped package source stays single-sourced.

Tasks

  • Create Unity-Tests/<version>/ projects for each Unity version in the matrix, each with a version-appropriate manifest.json + committed packages-lock.json.
  • Reference extensions.unity.imageloader (the Assets/root package) from each test project via a local file: path so there is one source of truth.
  • Update .github/workflows/test_pull_request.yml (and the release.yml test stage) so each matrix entry passes its own projectPath: ./Unity-Tests/<version>. The reusable test_unity_plugin.yml already accepts projectPath as an input, so no change needed there.
  • Confirm the in-process TestHttpServer test infrastructure still works from the relocated test projects.
  • Consider adding a standalone testMode (the reference project runs editmode/playmode/standalone).
  • Once green, remove the test-running responsibility from Unity-Package/ (it becomes purely the package-authoring project, matching the reference).

Reference

Do in a separate PR (not #44).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions