Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There could be a few reasons why the "pytest tests" command is not recognized in Github Actions. Here are a few possibilities:

  1. pytest may not be installed on the Github Actions runner environment. In this case, the "pytest --version" command would work because it only checks if the pytest package is installed, but the "pytest tests" command would fail because it actually tries to execute the pytest command.

  2. The working directory in Github Actions may not be set correctly. If the "pytest tests" command is executed from a different directory than the one where the tests are located, it may not work as expected.

  3. There may be a typo or other syntax error in the command, causing it to not be recognized. Double-check the spelling and syntax of the command to ensure it is correct.

To troubleshoot this issue further, you can try logging into the Github Actions runner environment and running the "pytest tests" command manually to see if it works. If it does, check the working directory and any environment variables that may be affecting the command. If it still doesn't work, try reinstalling pytest or checking for any syntax errors in the command.