Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

Windows runners fail with "pytest is not recognized" error because pip-installed scripts may not be immediately available in PowerShell PATH.

Changes

  • .github/workflows/CI-models.yml: Changed pytest tests/ to python -m pytest tests/ in Windows job
  • .github/workflows/CI.yml: Changed pytest brainpy/ to python -m pytest brainpy/ in Windows job

Linux and macOS jobs unchanged - direct pytest invocation works correctly there.

- pytest tests/
+ python -m pytest tests/

Using python -m pytest invokes pytest as a module, bypassing PATH resolution issues on Windows.

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] The windows runner raised an error when running "Continuous Integration with Models" ci</issue_title>
<issue_description>The windows runner raised an error when running "Continuous Integration with Models" ci.

pytest: D:\a\_temp\2971078e-df66-4e10-9ecc-310312453275.ps1:2
Line |
   2 |  pytest tests/
     |  ~~~~~~
     | The term 'pytest' is not recognized as a name of a cmdlet, function, script file, or executable program. Check
     | the spelling of the name, or if a path was included, verify that the path is correct and try again.
Error: Process completed with exit code 1.
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: Routhleck <88108241+Routhleck@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix windows runner error for CI with models Fix Windows CI: Use python -m pytest instead of pytest command Dec 28, 2025
Copilot AI requested a review from Routhleck December 28, 2025 13:27
@Routhleck Routhleck marked this pull request as ready for review December 28, 2025 13:37
@Routhleck Routhleck merged commit 2e0b933 into master Dec 28, 2025
4 checks passed
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.

[BUG] The windows runner raised an error when running "Continuous Integration with Models" ci

2 participants