Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 4

Action doesn't seem to do the entire yml for Windows, but works on Linux

Solved! Go to Solution.

I've got: https://github.com/djotaku/amortization/blob/master/.github/workflows/windowsbuild.yml and https://github.com/djotaku/amortization/blob/master/.github/workflows/pullrequest.yml which are the same except the first is supposed to run on Windows. (And also I made the first currently run on push so that I don't have to make fake PRs to test it). When do a push, the Windows action seems to stop after Pytest instead of continuing through to the artifact like the Linux version does.

 

Ideas what I could be doing wrong?

 

Thanks!

 

 
3 Replies
Solution
GitHub Staff
Message 2 of 4

Re: Action doesn't seem to do the entire yml for Windows, but works on Linux

This is often an issue in how CMD scripts interact with executing other CMD scripts.  You can change the shell that the workflow is using, which should help.  For example:

 

- name: Test with pytest
  run: |
    pip install pytest
    pytest test.py
  shell: bash

 

Copilot Lvl 2
Message 3 of 4

Re: Action doesn't seem to do the entire yml for Windows, but works on Linux

If I understand correctly, you're saying that if two Github actions are running at once they end up running the same thing unless you specify a shell?

GitHub Staff
Message 4 of 4

Re: Action doesn't seem to do the entire yml for Windows, but works on Linux

No, that's not what I'm saying.  Sometimes invoking a CMD script from within a CMD script causes problems.

 

You can avoid this by using the CALL command, or you can avoid this by using a different shell altogether.