-
-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate Core and Manager Scripts. Align CI pipeline and tests with new script layout, add GUT. #576
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 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
90f2b82
Update .gitignore
ikostan 85d572e
Update .gitignore
ikostan 0365ec9
Update run_pipeline.sh
ikostan 371d6bc
README updates
ikostan c3b3b09
Update run_pipeline.sh
ikostan 25e21bf
Update run_gdunit4_unit_tests.sh
ikostan aff443f
Refactor Phase 3: Migrate Core and Manager scripts #526
ikostan 1995f5a
Install GUT before running it and use the configured test directory.
ikostan f9e5307
Refactor Phase 3: Migrate Core and Manager scripts #526
ikostan 9364109
1. Invalid RUN keyword (Line 54) — Dockerfile syntax in a bash script
ikostan 464db5c
2. -gdir=res://test -ginclude_subdirs=true still present (Line 62)
ikostan 49fa33c
Update test_audio_manager.gd
ikostan bb19177
Update run_pipeline.sh
ikostan ea06ea7
install the tool during the Docker build stage so it is "baked in" to…
ikostan 171e27d
Update run_pipeline.sh
ikostan 67535c9
Update run_pipeline.sh
ikostan 41c04bc
Remove or wire PW_TIMEOUT into the pytest command.
ikostan c8e2cc6
Update Platforms_for_Web_Deployment_Guide.md
ikostan 983955a
Update Platforms_for_Web_Deployment_Guide.md
ikostan 8228fbd
issue (bug_risk): Clarify timeout units to match pytest-timeout expec…
ikostan 0aa098b
suggestion (performance): Avoid downloading and unpacking GUT on ever…
ikostan 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
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
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
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
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
File renamed without changes.
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 |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
| PROJECT_DIR="/project" | ||
| EXPORT_DIR="$PROJECT_DIR/export/web_thread_off" | ||
| SERVER_PORT=8080 | ||
| PW_TIMEOUT=10000 # Default timeout in ms; adjustable | ||
| PW_TIMEOUT=10000 | ||
|
|
||
| # Function to check if a step failed | ||
| check_exit() { | ||
|
|
@@ -27,7 +27,9 @@ check_exit "GDScript Lint" | |
|
|
||
| # 2. Markdown Lint | ||
| echo "Running Markdown Lint..." | ||
| markdownlint-cli2 "**/*.md" --config .markdownlint-cli2.yaml --fix | ||
| # --yes: skips the interactive install prompt | ||
| # !venv/**: prevents the linter from scanning your virtual environment | ||
| npx --yes [email protected] "**/*.md" "!venv/**" --config .markdownlint-cli2.yaml --fix | ||
| check_exit "Markdown Lint" | ||
|
|
||
| # 3. YAML Lint | ||
|
|
@@ -36,8 +38,8 @@ yamllint -c .yamllint.yaml .github/workflows/*.yml | |
| check_exit "YAML Lint" | ||
|
|
||
| # 4. Godot Unit Tests (GDUnit4 v6) | ||
| echo "Downloading GDUnit4 if needed (already in image, but ensure project addons)..." | ||
| cp -r /project/addons/gdUnit4 $PROJECT_DIR/addons/ || true # Copy if not present | ||
| echo "Ensuring GDUnit4 addons are present..." | ||
| cp -r /project/addons/gdUnit4 $PROJECT_DIR/addons/ || true | ||
|
ikostan marked this conversation as resolved.
Outdated
|
||
|
|
||
| echo "Importing Resources..." | ||
| godot --headless --path $PROJECT_DIR --import --quit | ||
|
|
@@ -47,42 +49,41 @@ echo "Running GDUnit4 Tests..." | |
| godot --headless --path $PROJECT_DIR -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --verbose --ignoreHeadlessMode --add res://test | ||
| check_exit "GDUnit4 Tests" | ||
|
|
||
| # Upload reports (simulate artifact upload by copying to a reports dir) | ||
| # 5. GUT Unit Tests | ||
| echo "Running GUT Unit Tests..." | ||
| godot --headless --verbose --path $PROJECT_DIR -s res://addons/gut/gut_cmdln.gd -gconfig=res://.gutconfig.json -gdir=res://test -ginclude_subdirs=true -gexit | ||
| check_exit "GUT Unit Tests" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| mkdir -p $PROJECT_DIR/reports | ||
| cp -r reports/** $PROJECT_DIR/reports || true | ||
|
|
||
| # 5. Browser Functional Tests | ||
| # 6. Browser Functional Tests | ||
| echo "Exporting Godot Project to Web..." | ||
| mkdir -p $EXPORT_DIR | ||
|
|
||
| # Simulate firebelley/godot-export action: Run Godot export to HTML5 | ||
| godot --headless --path $PROJECT_DIR --export-release "Web_thread_off" $EXPORT_DIR/index.html | ||
| check_exit "Godot Web Export" | ||
|
|
||
| # Start web server in background | ||
| python3 -m http.server $SERVER_PORT --directory $EXPORT_DIR & | ||
| SERVER_PID=$! | ||
|
|
||
| # Wait for server to be ready | ||
| for i in {1..20}; do | ||
| if curl -f http://localhost:$SERVER_PORT/index.html >/dev/null 2>&1; then | ||
| echo "Web server ready" | ||
| break | ||
| fi | ||
| sleep 1 | ||
| done | ||
|
|
||
| if [ $i -eq 20 ]; then | ||
|
ikostan marked this conversation as resolved.
Outdated
|
||
| echo "Web server failed to start" | ||
| kill $SERVER_PID | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Run Playwright tests | ||
| echo "Running Playwright Browser Tests..." | ||
| pytest tests/ --ignore=tests/refactor -v --junitxml=$PROJECT_DIR/report.xml | ||
| check_exit "Playwright Tests" | ||
|
|
||
| # Generate test report summary | ||
| if [ -f $PROJECT_DIR/report.xml ]; then | ||
| total=$(xmllint --xpath 'count(//testcase)' $PROJECT_DIR/report.xml) | ||
| failures=$(xmllint --xpath 'count(//testcase/failure)' $PROJECT_DIR/report.xml) | ||
|
|
@@ -95,17 +96,13 @@ if [ -f $PROJECT_DIR/report.xml ]; then | |
| echo "- Failed: $failures" | ||
| echo "- Errors: $errors" | ||
| echo "- Skipped: $skipped" | ||
| else | ||
| echo "No report.xml found—tests may not have run." | ||
| fi | ||
|
|
||
| # Cleanup: Stop server | ||
| kill $SERVER_PID | ||
|
|
||
| # Simulate artifact uploads (copy to host via mounted volume) | ||
| mkdir -p $PROJECT_DIR/artifacts | ||
| cp $PROJECT_DIR/report.xml $PROJECT_DIR/artifacts/ || true | ||
| cp main_menu.png $PROJECT_DIR/artifacts/ || true # If screenshot exists | ||
| cp main_menu.png $PROJECT_DIR/artifacts/ || true | ||
| cp -r $PROJECT_DIR/reports $PROJECT_DIR/artifacts/gdunit-reports || true | ||
|
|
||
| echo "Pipeline completed successfully!" | ||
| echo "Pipeline completed successfully!" | ||
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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.
Uh oh!
There was an error while loading. Please reload this page.