-
Notifications
You must be signed in to change notification settings - Fork 0
fix: check UNITY_LICENSE via env in workflow #22
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: check UNITY_LICENSE via env in workflow #22
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 fixes a GitHub Actions workflow syntax error in the claude-nl-suite.yml
workflow file. The issue was that secrets.UNITY_LICENSE
was being referenced directly in workflow conditions, which is not allowed in GitHub Actions due to security constraints. The secrets context can only be accessed in specific locations like environment variable assignments.
The fix involves two key changes:
- Moving the
UNITY_LICENSE
environment variable from step-level to job-level scope, making it accessible throughout the entire job - Updating the conditional expressions in Unity compilation steps to reference
env.UNITY_LICENSE
instead ofsecrets.UNITY_LICENSE
This change maintains the exact same functional behavior - Unity compilation steps will only run when a Unity license is available - but uses the correct GitHub Actions syntax. The workflow is part of the Unity MCP project's CI/CD pipeline and ensures that Unity-specific build steps are conditionally executed based on license availability.
Important Files Changed
Click to expand file changes
Filename | Score | Overview |
---|---|---|
.github/workflows/claude-nl-suite.yml |
5/5 | Fixed GitHub Actions syntax by moving UNITY_LICENSE to job-level env and updating conditional references |
Confidence score: 5/5
- This PR is safe to merge with minimal risk
- Score reflects a straightforward syntax fix that follows GitHub Actions best practices
- No files require special attention
Sequence Diagram
sequenceDiagram
participant User
participant GitHub
participant Runner as "Ubuntu Runner"
participant Python as "Python/uv"
participant Claude as "Claude Action"
participant Unity as "Unity Test Runner"
User->>GitHub: "Trigger workflow_dispatch"
GitHub->>Runner: "Start nl-suite job"
Runner->>Runner: "Check workflow_dispatch condition"
Runner->>Runner: "Set UNITY_LICENSE env from secrets"
Runner->>GitHub: "Checkout repository (fetch-depth: 0)"
Runner->>Python: "Install Python 3.11 + uv"
Runner->>Python: "Install Unity MCP server deps if requirements.txt exists"
Runner->>Claude: "Run Claude NL/T test suite"
Claude->>Claude: "Execute with prompt_file: .claude/prompts/nl-unity-suite.md"
Claude->>Claude: "Use allowed tools and MCP config"
Claude-->>Runner: "Return test results"
Runner->>GitHub: "Upload JUnit test artifacts"
Runner->>GitHub: "Annotate PR with test results"
alt Unity Project detected and UNITY_LICENSE available
Runner->>Unity: "Run Unity compile (Project mode)"
Unity-->>Runner: "Compilation results"
else Unity Package detected and UNITY_LICENSE available
Runner->>Unity: "Run Unity compile (Package mode)"
Unity-->>Runner: "Compilation results"
end
Runner->>Runner: "Clean working tree (restore and clean)"
Runner-->>GitHub: "Job complete"
1 file reviewed, no comments
Summary
secrets
reference in workflow conditionsUNITY_LICENSE
Testing
pytest
https://chatgpt.com/codex/tasks/task_e_68a43b83c6c88327b89fa0840e3b8ab2