Skip to content

Thin wrapper: delegate to game-ci/unity-engine-core - #111

Draft
frostebite wants to merge 3 commits into
mainfrom
thin-wrapper-unity-engine-core
Draft

Thin wrapper: delegate to game-ci/unity-engine-core#111
frostebite wants to merge 3 commits into
mainfrom
thin-wrapper-unity-engine-core

Conversation

@frostebite

Copy link
Copy Markdown
Member

First real consumer of game-ci/unity-engine-core (paired with unity-engine-core#1), implementing the "thin wrapper" direction settled on in game-ci/roadmap#11 (workstream 2, Option A) — unity-activate was the pilot repo chosen for extraction since it's the smallest of the three action repos (1 input, 0 outputs).

What changed:

  • src/model/* (Action, Docker, ImageTag, Input + tests, ~467 lines) removed — this logic now lives in game-ci/unity-engine-core's src/unity-activate/, already extracted and tested there (21/21 tests passing).
  • src/index.ts now imports run from @game-ci/unity-engine-core/dist/unity-activate and calls it directly.
  • package.json depends on @game-ci/unity-engine-core via a git dependency (not yet published to npm) pinned to #main.
  • vitest.config.mts: added passWithNoTests: true since coverage now lives in the destination repo.
  • action.yml is unchanged — still main: dist/index.js; the bundled output (via ncc) now just contains the delegated implementation instead of a local copy. The Action.rootFolder/actionFolder/dockerfile path logic (unchanged, carried over verbatim during extraction) resolves relative to wherever the final bundle lands at runtime, so dist/Dockerfile in this repo is still the one that gets used.

Open questions (draft, not final):

  • Git-dependency-as-npm-package is one of the invocation mechanisms discussed in roadmap#11 (vs. subprocess shell-out, vs. the CLI-provider-protocol pattern) — unity-engine-core's run() export supports both in-process and subprocess invocation, so this isn't locked in. Feedback welcome on whether this is the right mechanism before repeating the pattern for unity-builder/unity-test-runner.
  • Once this stabilizes, the git dependency should pin to a tag/SHA rather than tracking #main.
  • yarn install for a git dependency's prepare script needs enableScripts.yarnrc.yml doesn't currently set this explicitly; CI will confirm whether the default is sufficient or this needs an explicit flip.

Typecheck passes locally (tsc --noEmit, both repos); full yarn install && yarn build needs to run in CI to validate the git-dependency install path end-to-end.

Delegates activation logic to the extracted implementation in
game-ci/unity-engine-core instead of maintaining a local copy, per
game-ci/roadmap#11 workstream 2 (Option A). src/model/* is removed;
build/test coverage now lives in the destination repo.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4bb7a46b-0739-4724-90f0-43d62733a5e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

unity-engine-core#2 fixed a missing-dist bug (Yarn Berry doesn't run
install-time scripts by default, so the git dependency had no
compiled output). This repoints the lockfile at that fix.
unity-engine-core#3 fixed a real runtime bug: the compiled dist/
output was missing Dockerfile/entrypoint.sh (tsc doesn't copy static
assets), so Docker.build() would have failed to find its Dockerfile
the first time activation actually ran through this dependency.
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