Open
Conversation
Owner
kaz29
commented
May 6, 2025
- bakeコマンドでの生成が正常に動作するかのテストを追加
- ローカル環境で複数バージョンのPHP環境でテストを実行するためのdocker環境の作成
- Github Actionでのunittest実行用のworkflowを追加
There was a problem hiding this comment.
Pull Request Overview
This PR adds unit tests to verify that the bake command works correctly, introduces a Docker-based testing environment for multiple PHP versions, and sets up a GitHub Actions workflow for running unit tests.
- Added docker-compose configuration for local multi-PHP environment tests
- Implemented GitHub Actions workflow for running PHP unit tests
- Established MySQL service setup for testing across environments
Reviewed Changes
Copilot reviewed 3 out of 17 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docker-compose.test.yml | Introduces Docker services for PHP 8.3, PHP 8.4, and MySQL testing |
| .github/workflows/test.yml | Implements a GitHub Actions workflow for running unit tests with PHP |
Files not reviewed (14)
- Dockerfile.test: Language not supported
- composer.json: Language not supported
- run-tests.sh: Language not supported
- tests/Fixture/TestTablesFixture.php: Language not supported
- tests/TestCase/Command/OpenApiControllerCommandTest.php: Language not supported
- tests/TestCase/Command/OpenApiModelCommandTest.php: Language not supported
- tests/bootstrap.php: Language not supported
- tests/config/app.php: Language not supported
- tests/config/bootstrap.php: Language not supported
- tests/test_app/config/app.php: Language not supported
- tests/test_app/config/app_local.php: Language not supported
- tests/test_app/config/bootstrap.php: Language not supported
- tests/test_app/src/Application.php: Language not supported
- tests/test_app/src/Controller/AppController.php: Language not supported
Comment on lines
+56
to
+57
| run: | | ||
| while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do |
There was a problem hiding this comment.
Consider adding a timeout or maximum number of retries to the MySQL waiting loop to avoid a potential infinite loop if MySQL fails to start.
Suggested change
| run: | | |
| while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do | |
| run: | | |
| MAX_RETRIES=30 | |
| RETRY_COUNT=0 | |
| while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do | |
| RETRY_COUNT=$((RETRY_COUNT+1)) | |
| if [ "$RETRY_COUNT" -ge "$MAX_RETRIES" ]; then | |
| echo "MySQL failed to start after $MAX_RETRIES retries." | |
| exit 1 | |
| fi |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.