generated from yii2-extensions/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add MySQL CI workflow and corresponding test classes for improoved database testing.
#61
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 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
19ee1ed
feat: add `MySQL` CI workflow and corresponding test classes for impr…
terabytesoftw 64bc5d5
fix: update action reference in `MySQL` CI workflow for correct path,
terabytesoftw 26ba362
fix: specify version for phpunit-database workflow in `MySQL` CI conf…
terabytesoftw f66dfa2
fix: update database connection settings in `MySQL` test classes.
terabytesoftw cc2773e
fix: rename 'user' to 'username' in database connection configuration…
terabytesoftw c089ff4
fix: remove redundant name from `MySQL` CI job configuration.
terabytesoftw a69fe70
fix: add descriptive name to `MySQL` job in CI configuration.
terabytesoftw f476257
fix: rename 'user' to 'username' in `MySQL` test classes for consiste…
terabytesoftw 7ca0902
fix: execute `dropTable()` commands in `TestCase` to ensure proper ta…
terabytesoftw 8d723b4
fix: add `phpunit` group to `MySQL` CI configuration for improved tes…
terabytesoftw 62de88f
fix: rename CI workflow to `build-mysql` for clarity and correct `php…
terabytesoftw 16bfd6f
fix: rename `group-phpunit` to `phpunit-group` for consistency in CI …
terabytesoftw 1e58e92
fix: update CI configuration to use `phpunit-group` for `MySQL` compa…
terabytesoftw 73ef80c
feat: add initial CI workflow for MySQL tests with phpunit integration.
terabytesoftw 2dca3d6
feat: Add `PostgreSQL` test suite with multiple test cases for improv…
terabytesoftw e04784e
fix: sort dataset queries by `id` for consistent order in test cases.
terabytesoftw f43e8bb
feat: add `driverName` property to test classes for database compatib…
terabytesoftw e90daf5
fix: update `DSN` property placement in `MySQL` and `PostgreSQL` test…
terabytesoftw 762243b
feat: add `SQLServer` test suite with multiple test cases for improve…
terabytesoftw 9d40d7e
feat: add installation command for Microsoft ODBC Driver in `SQLServe…
terabytesoftw 6321cb8
fix: reorder `username` and `password` properties for consistency acr…
terabytesoftw cf299b0
fix: enhance root node insertion logic to check for existing nodes wi…
terabytesoftw 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| on: | ||
| - pull_request | ||
| - push | ||
|
|
||
| name: build | ||
|
|
||
| jobs: | ||
| mysql: | ||
| uses: php-forge/actions/.github/workflows/phpunit-database.yml@main | ||
| secrets: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
| with: | ||
| concurrency-group: mysql-${{ github.ref }} | ||
| database-env: | | ||
| { | ||
| "MYSQL_DATABASE": "yiitest", | ||
| "MYSQL_ROOT_PASSWORD": "root", | ||
| } | ||
| database-health-cmd: "mysqladmin ping" | ||
| database-health-retries: 3 | ||
| database-image: mysql | ||
| database-port: 3306 | ||
| database-type: mysql | ||
| database-versions: '["8.0", "8.4", "latest"]' | ||
| enable-concurrency: true | ||
| group-phpunit: mysql | ||
| extensions: pdo, pdo_mysql | ||
| os: '["ubuntu-latest"]' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractCacheManagement; | ||
|
|
||
| #[Group('mysql')] | ||
| final class CacheManagementTest extends AbstractCacheManagement | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } | ||
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractExceptionHandling; | ||
|
|
||
| #[Group('mysql')] | ||
| final class ExceptionHandlingTest extends AbstractExceptionHandling | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractExtensibility; | ||
|
|
||
| #[Group('mysql')] | ||
| final class ExtensibilityTest extends AbstractExtensibility | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } |
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractNodeAppend; | ||
|
|
||
| #[Group('mysql')] | ||
| final class NodeAppendTest extends AbstractNodeAppend | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
terabytesoftw marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractNodeDelete; | ||
|
|
||
| #[Group('mysql')] | ||
| final class NodeDeleteTest extends AbstractNodeDelete | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } |
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractNodeInsert; | ||
|
|
||
| #[Group('mysql')] | ||
| final class NodeInsertTest extends AbstractNodeInsert | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
terabytesoftw marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractNodePrepend; | ||
|
|
||
| #[Group('mysql')] | ||
| final class NodePrependTest extends AbstractNodePrepend | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } |
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractNodeState; | ||
|
|
||
| #[Group('mysql')] | ||
| final class NodeStateTest extends AbstractNodeState | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
terabytesoftw marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractQueryBehavior; | ||
|
|
||
| #[Group('mysql')] | ||
| final class QueryBehaviorTest extends AbstractQueryBehavior | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } |
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractTreeTraversal; | ||
|
|
||
| #[Group('mysql')] | ||
| final class TreeTraversalTest extends AbstractTreeTraversal | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } |
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,16 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace yii2\extensions\nestedsets\tests\mysql; | ||
|
|
||
| use PHPUnit\Framework\Attributes\Group; | ||
| use yii2\extensions\nestedsets\tests\base\AbstractValidationAndStructure; | ||
|
|
||
| #[Group('mysql')] | ||
| final class ValidationAndStructureTest extends AbstractValidationAndStructure | ||
| { | ||
| protected string|null $dsn = 'mysql:host=127.0.0.1;dbname=yiitest;charset=utf8mb4'; | ||
| protected string $user = 'root'; | ||
| protected string $password = 'root'; | ||
| } |
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
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
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.