Skip to content

Fix Windows test steps that never ran and the Windows conda cache path - #288

Merged
antonwolfy merged 1 commit into
mainfrom
ci/fix-windows-test-steps
Oct 16, 2026
Merged

antonwolfy merged 1 commit into
mainfrom
ci/fix-windows-test-steps

Conversation

@antonwolfy

Copy link
Copy Markdown
Collaborator

The Windows test jobs in conda-package.yml and conda-package-cf.yml have not been running any tests: the smoke test and pytest steps are skipped, and the steps still pass. The Windows conda package cache was never saved either. Both problems already exist on main, and a run from 2026-08-07 already shows the skipped steps.

Why the tests did not run

The test_windows steps run with shell: cmd /C CALL {0}, and the script calls conda activate ... without CALL. On Windows conda is a batch file (conda.bat), and running a batch file from another one without CALL never returns. So every command after the first conda call in the step is skipped:

  • Smoke test — python -c "import mkl_umath ..." never runs
  • Run tests — python -m pytest -v -s --pyargs mkl_umath never runs
  • Report content of test environment — the echo lines and conda info && conda list never run

The logs show it: the step echoes D:\a\mkl_umath\mkl_umath>conda activate test_mkl_umath and nothing after it, and there is no pytest output on Windows, while the Linux test jobs report 392 passed, 1 skipped.

Changes

In both workflows (test_windows only):

  • Prefix the conda calls in the three steps above with CALL. python / python -m pytest is now the last command of its step, so a failure fails the job.
  • Point the build_windows and test_windows cache steps at ~/conda_pkgs_dir, setup-miniconda's package directory (the logs show packages in C:\Users\runneradmin\conda_pkgs_dir), instead of /home/runner/conda_pkgs_dir, which does not exist on Windows runners. Every Windows job currently logs "Path Validation Error" and "Cache not found".

The conda activate calls in build_windows are unchanged: those steps run under the default pwsh shell, where conda activate is a PowerShell function and returns normally.

Notes

  • This is the first time in a while that the Windows tests actually run, so it may surface Windows test failures that were hidden until now.
  • setup-miniconda's README recommends use-only-tar-bz2: true for caching. It is not set here because most conda-forge packages are now published only as .conda; the Linux jobs already cache ~/.conda/pkgs without it.

The Windows test jobs in conda-package.yml and conda-package-cf.yml run
their steps with `cmd /C CALL {0}` and invoked `conda activate` without
CALL. conda is a batch file, and running a batch file from another one
without CALL never returns, so everything after it in the step was
skipped: the smoke test and pytest never ran, and the steps still
passed. Prefix the conda calls in those steps with CALL.

The Windows build and test jobs also cached /home/runner/conda_pkgs_dir,
which does not exist on Windows runners, so the cache was never saved.
Point it at ~/conda_pkgs_dir, where setup-miniconda keeps packages.

@jharlow-intel jharlow-intel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great catch! The commit message explains the batch-file CALL trap clearly, and the Windows job logs now show pytest actually running (392 passed) and the conda cache being saved, where main skipped both silently.

@antonwolfy
antonwolfy merged commit 3ef535e into main Oct 16, 2026
172 of 181 checks passed
@antonwolfy
antonwolfy deleted the ci/fix-windows-test-steps branch October 16, 2026 16:44
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.

2 participants