You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: unblock beta compile and gate releases on test success (#1103)
* fix: align CaptureComposited with renamed Project*-folder API
PR #1040 added CaptureComposited referencing the old Assets-folder names
(CaptureFromCameraToAssetsFolder, AssetsRelativePath) and called
PrepareCaptureResult without the now-required folderOverride argument.
Renames into the Project* equivalents; same fix at the call sites in
ManageScene.cs.
Closes#1100
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: gate releases on test success and trigger tests on PRs
Beta-release was publishing to PyPI in parallel with Unity Tests, so
broken commits could ship if Unity tests failed (as happened with #1100
on 9.6.9-beta.5). Make publish/version-bump jobs depend on the test
jobs in both beta-release.yml and release.yml. The whole release halts
before any irreversible commit/tag/push if either test job fails.
Also extends the test workflows to fire on PRs so failures are caught
before merge:
- python-tests: pull_request trigger; runs on every PR (no secrets).
- unity-tests: pull_request_target [labeled] trigger gated on the
safe-to-test label and on the PR being from a fork. Maintainers
apply the label after reviewing the diff; the workflow then runs
with UNITY_LICENSE in scope against the PR head SHA. Re-pushed
commits do NOT auto-trigger; maintainer must remove and re-apply
the label to re-run after additional review.
In-repo PRs continue to be tested via the existing push trigger, so
no labeling friction for collaborator branches.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(screenshot): propagate folderOverride to composited and specific-camera paths
Two pre-existing inconsistencies surfaced by CodeRabbit on #1103:
1. CaptureComposited dropped the caller's output_folder by hardcoding
folderOverride: null in PrepareCaptureResult and the camera fallbacks.
Adds the parameter to CaptureComposited's signature and plumbs it
through both fallback paths.
2. The targetCamera and includeImage-in-play paths in ManageScene's
game_view screenshot did not resolve cmd.outputFolder, so a request
that selected a specific camera would always write to the default
folder. Resolve via ScreenshotPreferences.Resolve as the other paths
already do, and gate AssetDatabase.ImportAsset on IsUnderAssets so
non-Assets folders don't trigger a futile import.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci(unity-tests): harden pull_request_target and gate artifact upload
Address CodeRabbit security review on #1103:
- persist-credentials: false on the checkout step, so GITHUB_TOKEN is
not written to disk and cannot be read by subsequent steps running
PR-controlled code.
- Explicit permissions: contents: read on the testAllModes job, scoping
the workflow's token down from the default read/write set.
- Skip upload-artifact when the main test step was skipped (e.g.,
because the preceding domain-reload step failed without
continue-on-error). Avoids the noisy "No files were found" error
on top of an already-failed run.
The label-gated trigger plus these mitigations narrow the blast radius
of the pull_request_target + checkout-PR-head pattern. The remaining
trust boundary is the maintainer review before applying safe-to-test;
documenting the review checklist (especially TestProjects/UnityMCPTests
diffs) is a follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments