Repository navigation
test: migrate the tests to cycle/testing - #11
Merged
Merged
Conversation
testo.php keeps driving the composer scripts and CI until the suites move over; testo.cycle.php is the cycle/testing config they move to. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
cycle/testing runs one Common test class against every driver, so the per-driver subclasses, BaseTestCase and the local docker-compose file have no job left. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
The package compose file waits for the database itself, which replaces the hand-written wait loops; DB_REQUIRED=1 makes an unreachable database fail the job instead of skipping its tests. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #11 +/- ##
===========================================
+ Coverage 96.15% 100.00% +3.84%
===========================================
Files 8 5 -3
Lines 78 75 -3
===========================================
Hits 75 75
+ Misses 3 0 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
yiisoft/di, used by the Yii3 config test, declares php 8.1 - 8.5 even on master, so composer cannot resolve on PHP 8.6. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What was changed
^0.1.1, from its VCS repository until it reaches Packagist):testo.phpis built onCycle\Testing\Configwith aUnitsuite and oneAcceptance/<Driver>suite per driver, each with an in-memory SQLitesecondarydatabase and the ORM plugin.tests/Acceptance/Common/TransactionTestthat cycle/testing runs against every driver.test:<driver>runs that driver's suites,db:up/db:downstart and stop the databases from the cycle/testing compose file. Infection runs theUnitsuite..github/workflows/testing.ymlcalls the sharedcycle/gh-actionsTesto workflow with coverage on. Unit and SQLite run on PHP 8.2–8.6 with highest dependencies and on 8.2 with lowest; MySQL, Postgres and SQLServer run on PHP 8.2 and 8.6 (highest, plus lowest on 8.2); every job runs withDB_REQUIRED=1, so an unreachable database fails the job instead of skipping; coverage goes to Codecov with one flag per suite. It replacestesting.yml(Unit, coverage) andci-sqlite.yml,ci-mysql.yml,ci-pgsql.yml,ci-mssql.yml. Composer runs with--ignore-platform-req=php+:yiisoft/di(used by the Yii3 config test) declares PHP up to 8.5, so PHP 8.6 cannot resolve without dropping that upper bound.tests/Acceptance/Driver,BaseTestCase,tests/docker-compose.yml, the hand-written database wait loops and connection env in CI, and thetest:acceptance,test:integrationandtest:no-driverscripts.--suite=Acceptance/MySQL) instead of--group=driver-*.Why?
One harness for all Cycle packages: databases, driver matrix and isolation come from cycle/testing instead of per-repo copies.
Checklist