Ask Your Question
2

Why does the 'pytest --version' command work but the 'pytest tests' command is not recognized when running Bash in Github Actions?

asked 2023-07-12 05:50:55 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-07-12 06:13:02 +0000

pufferfish gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-12 05:50:55 +0000

Seen: 10 times

Last updated: Jul 12 '23