-
Notifications
You must be signed in to change notification settings - Fork 0
fix: detect Unity mode and secrets in workflow #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: detect Unity mode and secrets in workflow #24
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR enhances the Unity workflow robustness by implementing runtime detection for Unity license availability and project structure modes. The changes address workflow failures that occur when Unity secrets are missing or when the repository structure doesn't match expected Unity configurations.
The key improvement is the addition of a detection step that checks for the presence of UNITY_LICENSE
secret and identifies whether the repository is configured as a Unity project (has ProjectSettings/ProjectVersion.txt
) or package (has Packages/manifest.json
without project settings). This detection logic replaces the previous approach of having UNITY_LICENSE
set at the job level and using hashFiles()
functions in conditionals, which could fail unexpectedly.
The workflow now conditionally executes Unity compilation steps only when both the license is available and the correct project structure is detected. Environment variables have been moved from job-level to step-level scope for better isolation. Additionally, the test reporter step includes fail-on-empty: false
to prevent workflow failures when no test results are generated.
These changes make the workflow more suitable for repositories that may optionally include Unity components, improving the overall reliability of the CI/CD pipeline in the Unity MCP project ecosystem.
Important Files Changed
Files Modified
Filename | Score | Overview |
---|---|---|
.github/workflows/claude-nl-suite.yml | 4/5 | Enhanced Unity workflow with runtime detection of license and project structure to prevent failures |
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it improves workflow reliability without changing core functionality
- Score reflects solid defensive programming practices and clear improvement to CI/CD robustness
- No files require special attention as the changes are well-contained within the workflow configuration
Sequence Diagram
sequenceDiagram
participant User
participant GitHub
participant Workflow as "claude-nl-suite workflow"
participant Claude as "Claude NL/T Action"
participant Unity as "Unity Test Runner"
participant Artifacts as "GitHub Artifacts"
User->>GitHub: "Trigger workflow_dispatch"
GitHub->>Workflow: "Start nl-suite job"
Workflow->>Workflow: "Checkout repository"
Workflow->>Workflow: "Install Python + uv"
Workflow->>Workflow: "Prepare Unity MCP server deps"
Workflow->>Claude: "Run Claude NL/T test suite"
Claude->>Claude: "Execute tests with MCP tools"
Claude-->>Workflow: "Test results"
Workflow->>Artifacts: "Upload JUnit test results"
Workflow->>GitHub: "Annotate PR with test results"
Workflow->>Workflow: "Detect Unity mode & secrets"
Note over Workflow: Check for UNITY_LICENSE, ProjectSettings, Packages
alt has_license == true && is_project == true
Workflow->>Unity: "Unity compile (Project mode)"
Unity->>Unity: "Run EditMode tests"
Unity-->>Workflow: "Compilation results"
else has_license == true && is_package == true
Workflow->>Unity: "Unity compile (Package mode)"
Unity->>Unity: "Compile package with Unity 2022.3.45f1"
Unity-->>Workflow: "Compilation results"
end
Workflow->>Workflow: "Clean working tree"
Workflow-->>GitHub: "Workflow complete"
1 file reviewed, no comments
Summary
Testing
pytest
yamllint .github/workflows/claude-nl-suite.yml
(failed: command not found)https://chatgpt.com/codex/tasks/task_e_68a444357fbc83279472a21bc58082d7