actions / setup-python

Set up your GitHub Actions workflow with a specific version of Python
MIT License
1.74k stars 551 forks source link

Python process exiting abruptly on windows-2019 #70

Closed jlaine closed 4 years ago

jlaine commented 4 years ago

I have been porting several project test suites over to GitHub Actions, and I encountered a strange behaviour on the windows-2019 image: running a trivial unittest-based test suite, Python exits with an exit code of 1 after successfully running just a single test. This behaviour does not occur on Linux, OS X or windows-2016.

I have put together a minimal project (no dependencies, a trivial module which just defines __version__, and two trivial tests) with which systematically triggers the issue:

https://github.com/aiortc/unittest-ga

As you can see the test suite:

The error looks like:

test_first (tests.test_me.MyTest) ... ok
##[error]Process completed with exit code 1.
jlaine commented 4 years ago

After some further investigation, the root cause may well be powershell. I'm not sure how it explains the different behaviour on Windows 2016 vs 2019, but adding shell: bash seems to fix the issue.