Skip to content

Tests: improve Windows compatibility - #323

Merged
swissspidy merged 25 commits into
mainfrom
fix/windows-tests
Apr 14, 2026
Merged

Tests: improve Windows compatibility#323
swissspidy merged 25 commits into
mainfrom
fix/windows-tests

Conversation

@swissspidy

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the scope:testing Related to testing label Apr 13, 2026
@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/DB_Command_SQLite.php 0.00% 46 Missing ⚠️

📢 Thoughts on this report? Let us know!

gemini-code-assist[bot]

This comment was marked as resolved.

@swissspidy swissspidy added this to the 2.1.6 milestone Apr 14, 2026
@swissspidy
swissspidy marked this pull request as ready for review April 14, 2026 12:55
@swissspidy
swissspidy requested a review from a team as a code owner April 14, 2026 12:55
Copilot AI review requested due to automatic review settings April 14, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 improves Windows compatibility for the DB-related Behat suite and SQLite command execution paths, mainly by avoiding POSIX-only paths/quoting and reducing SQLite file-locking failures on Windows.

Changes:

  • Update SQLite CLI invocation and export/import mechanics to be more Windows-friendly (path normalization, using -init scripts, closing $wpdb before deletes).
  • Adjust Behat scenarios to avoid /tmp/... paths and single-quote shell arguments that don’t work reliably on Windows.
  • Skip a few SQLite-related scenarios on Windows where CI/environment limitations (file locking, missing dbstat) make them unreliable.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/DB_Command_SQLite.php Improves SQLite CLI usage on Windows (env wrapper, file-lock mitigation, init-file based dump/import, path normalization).
features/db.feature Removes /tmp usage; skips flaky SQLite CRUD/export/import scenarios on Windows.
features/db-size.feature Skips SQLite table-size scenarios on Windows due to missing dbstat on CI.
features/db-search.feature Switches to Windows-compatible quoting and adjusts regex delimiter expectations; skips custom-color scenario on Windows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/DB_Command_SQLite.php Outdated
Comment thread src/DB_Command_SQLite.php
Comment thread src/DB_Command_SQLite.php Outdated
swissspidy and others added 3 commits April 14, 2026 15:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@swissspidy
swissspidy merged commit 7e19f23 into main Apr 14, 2026
7 checks passed
@swissspidy
swissspidy deleted the fix/windows-tests branch April 14, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants