-
Notifications
You must be signed in to change notification settings - Fork 1
CursorにUnitTestを作らせた #21
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
base: main
Are you sure you want to change the base?
Conversation
kaz29
commented
May 6, 2025
- bakeコマンドでの生成が正常に動作するかのテストを追加
- ローカル環境で複数バージョンのPHP環境でテストを実行するためのdocker環境の作成
- Github Actionでのunittest実行用のworkflowを追加
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.
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
run: | | ||
while ! mysqladmin ping -h"127.0.0.1" -P"3306" --silent; do |
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.
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.
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 |
Copilot uses AI. Check for mistakes.