Skip to content

T103 windows ci job - #110

Merged
niden merged 11 commits into
masterfrom
T103-windows-ci-job
Nov 28, 2026
Merged

niden merged 11 commits into
masterfrom
T103-windows-ci-job

Conversation

@niden

@niden niden commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • composer test, composer cs and composer analyze all pass
  • I have created a PR for the documentation about this change, if user facing

A CI job on windows-latest (PHP 8.4, phalcon/phalcon, no extension), and the fixes that make the unit suite pass there. The code for Windows runs there, not only in the unit tests that fake it. It is a gate for 1.0 (#16).

The job:

  • The unit suite (composer test). A failure blocks the merge. git on the runner turns LF into CRLF, so the job sets core.autocrlf false before the checkout. The job turns on fileinfo and the PDO drivers: PHP for Windows does not turn them on.
  • A real hand-off: the crest of the checkout is the global crest. In a project with its own crest (a path repository to the checkout), it runs php.exe vendor\bin\crest. The project has no Phalcon, so only the crest of the project shows not installed for Phalcon in about. An unknown command gives the exit status 1 back.
  • A real PATHEXT lookup: ShellRunner runs git (git.exe), and docker (docker.exe) when the runner image has it.

Changes in crest:

  • Output writes PHP_EOL for each line end, also for the line ends inside a text. A stub has \n, so before, one message on Windows had \r\n and \n.
  • ShellRunner finds a program on Windows by an ending of PATHEXT, for example composer.bat. On Windows, is_executable() is true only for a binary, so the commands of the new key (for example composer install) did not find composer.bat.

Changes in the tests:

  • The test folders come from realpath(): crest gets its paths from realpath() and getcwd(), and on Windows these have \. The printed paths stay mixed, for example D:\...\app/src/Action.
  • Skips on Windows, each with its reason: the setup script and the launcher (POSIX shell scripts), two ShellRunner tests that run a POSIX script, the executable mode, a file system that ignores case, a file or folder that chmod() does not make unreadable, and the composer test (proc_open() does not find composer.bat by its name).

The unit suite on Windows: 1998 tests, 72 skipped.

Not in scope: new, up and down with Linux containers. The Windows runners cannot run them. The docs say that native Windows with docker gets best effort only, and that WSL2 is the Linux path.

Thanks

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Base automatically changed from T102-test-services-mysql-mariadb to T97-make-database-existing-project November 27, 2026 22:19
@niden
niden force-pushed the T97-make-database-existing-project branch from 7f7cc85 to ea2d622 Compare November 27, 2026 22:28
Base automatically changed from T97-make-database-existing-project to master November 27, 2026 22:36
…and the command lookup

Assisted-by: Claude Code
Assisted-by: Claude Code
…ob also after a unit failure

Assisted-by: Claude Code
…he line ends, and skips for POSIX-only tests

Assisted-by: Claude Code
Assisted-by: Claude Code
@niden
niden force-pushed the T103-windows-ci-job branch from 0889434 to e916c26 Compare November 27, 2026 23:22
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

…sts, the line ends in messages, the quotes, the folder names, and a skip for composer

Assisted-by: Claude Code
Assisted-by: Claude Code
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Code Metrics Report

master (e2b33ef) T103-windows-ci-job (3840729) +/-
Coverage 99.8% 99.8% +0.0%
Test Execution Time 10s 12s +2s
Details
  |                     | master (e2b33ef) | T103-windows-ci-job (3840729) |  +/-  |
  |---------------------|------------------|-------------------------------|-------|
+ | Coverage            |            99.8% |                         99.8% | +0.0% |
  |   Files             |               97 |                            97 |     0 |
  |   Lines             |             4028 |                          4034 |    +6 |
+ |   Covered           |             4021 |                          4027 |    +6 |
- | Test Execution Time |              10s |                           12s |   +2s |

Code coverage of files in pull request scope (100.0% → 100.0%, patch 100.0%)

Files Coverage +/- Patch Coverage Status
src/Console/Output.php 100.0% 0.0% 100.0% modified
src/Process/ShellRunner.php 100.0% 0.0% 100.0% modified

Reported by octocov

@niden
niden merged commit ede84a3 into master Nov 28, 2026
42 checks passed
@niden
niden deleted the T103-windows-ci-job branch November 28, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant