-
Notifications
You must be signed in to change notification settings - Fork 0
feat(#37): Add Unity test foundation and CI workflow #45
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
10ac287
chore: Add .claude, .omc, and .codex to .gitignore
qda-sw b847e92
Squashed commit of the following:
qda-sw af15f96
feat(#37): add Unity EditMode/PlayMode test foundation and CI workflow
qda-sw 34655f0
feat(#37) : Add Lobby scene EditMode/PlayMode tests and test README
qda-sw b9dc74d
fix(#37) : Fix PlayMode test CI failure and workflow permissions
qda-sw 6722af9
fix(#37) : Add disk cleanup step to prevent CI runner out of space
qda-sw d418e94
fix(#37) : Merge EditMode and PlayMode into single CI job
qda-sw 0b24e49
Revert "Squashed commit of the following:"
qda-sw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: Unity Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "GGJ26/**" | ||
| - ".github/workflows/unity-tests.yml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| checks: write | ||
|
|
||
| jobs: | ||
| unity-tests: | ||
| name: Unity Tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - name: Free disk space | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | ||
| sudo docker image prune --all --force | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| lfs: true | ||
|
|
||
| - name: Cache Library | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: GGJ26/Library | ||
| key: Library-${{ hashFiles('GGJ26/Assets/**', 'GGJ26/Packages/manifest.json', 'GGJ26/ProjectSettings/**') }} | ||
| restore-keys: | | ||
| Library- | ||
|
|
||
| - name: Run EditMode tests | ||
| id: editmode | ||
| uses: game-ci/unity-test-runner@v4 | ||
| env: | ||
| UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||
| with: | ||
| projectPath: GGJ26 | ||
| testMode: EditMode | ||
| unityVersion: auto | ||
| githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
| checkName: EditMode Test Results | ||
|
|
||
| - name: Upload EditMode artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: unity-editmode-results | ||
| path: ${{ steps.editmode.outputs.artifactsPath }} | ||
| if-no-files-found: warn | ||
| retention-days: 7 | ||
|
|
||
| - name: Run PlayMode tests | ||
| id: playmode | ||
| if: always() | ||
| uses: game-ci/unity-test-runner@v4 | ||
| env: | ||
| UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | ||
| UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | ||
| UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | ||
| with: | ||
| projectPath: GGJ26 | ||
| testMode: PlayMode | ||
| unityVersion: auto | ||
| githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
| checkName: PlayMode Test Results | ||
|
|
||
| - name: Upload PlayMode artifacts | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: unity-playmode-results | ||
| path: ${{ steps.playmode.outputs.artifactsPath }} | ||
| if-no-files-found: warn | ||
| retention-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,12 @@ | |
| # Antigravity | ||
| .agent/ | ||
| .gemini/ | ||
| scripts/ | ||
| scripts/ | ||
|
|
||
| # Claude code | ||
| .claude/ | ||
| CLAUDE.md | ||
| .omc/ | ||
|
|
||
| # Codex | ||
| .codex/ | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This workflow uses secrets on
pull_request. For PRs coming from forks, GitHub does not expose repository secrets, so these jobs will fail consistently. Consider adding a conditional (e.g., only run whengithub.event.pull_request.head.repo.fork == false), or switch to a safe alternative strategy (like requiring maintainers to run viaworkflow_dispatch, or usingpull_request_targetwith strict hardening).