Skip to content

ci: run the unit tests on Windows too - #1657

Open
DiegoDAF wants to merge 2 commits into
dbcli:mainfrom
DiegoDAF:upstream/windows-unit-tests
Open

DiegoDAF wants to merge 2 commits into
dbcli:mainfrom
DiegoDAF:upstream/windows-unit-tests

Conversation

@DiegoDAF

@DiegoDAF DiegoDAF commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Hi @dbaty 👋 !!!

Picks up #1442. Service containers do not run on Windows runners, so the job starts the PostgreSQL the windows-latest image ships. Unit tests only: behave drives pgcli through pexpect.spawn, which Windows lacks.

Three test fixes were needed: tox passes USERNAME (getpass.getuser() has no pwd to fall back on), the \ne test tolerates the open log at temp-dir cleanup, and the alias-map test writes a plain file (Windows cannot reopen an open NamedTemporaryFile).

Green on my fork: 2808 passed, 1 skipped (setproctitle). https://github.com/DiegoDAF/pgcli.daf/actions/runs/41875648408

tox passes USERNAME, which getpass.getuser() reads on Windows (there is
no pwd module to fall back on); the named-query test tolerates the log
pgcli keeps open when its temporary directory is removed; the alias map
is a plain file, since Windows cannot reopen an open NamedTemporaryFile
by name.
Service containers do not run on Windows runners, so the job starts the
PostgreSQL that the windows-latest image ships. behave stays Linux-only:
it drives pgcli through pexpect.spawn, which Windows does not have.
DiegoDAF added a commit to DiegoDAF/pgcli.daf that referenced this pull request Nov 4, 2026
@DiegoDAF
DiegoDAF marked this pull request as ready for review November 4, 2026 18:12

This branch has not been deployed

No deployments
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