Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal Windows CI with GitHub Action #92

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

rhysd
Copy link

@rhysd rhysd commented Jan 30, 2020

Related to #90

Hi,

This PR adds a minimal Windows CI with GitHub Action. It only runs unit tests and takes coverage with Python 3.8.

Here is an example of CI result:

https://github.com/rhysd/covimerage/runs/416425706?check_suite_focus=true

Currently several tests fail but I don't know the failures are due to #90.

Do unit tests run with tox require vim or nvim editor command? Currently they are not installed. Please let me know if they are necessary. I'll add step to install them.

EDIT: If you want to put a CI badge for this in README.md, please let me know. I'll do.

@rhysd rhysd requested a review from blueyed January 30, 2020 03:28
@rhysd
Copy link
Author

rhysd commented Jan 30, 2020

I also added Python 3.5, 3.6, 3.7. 3.4 is not supported by setup-python action.

@rhysd rhysd force-pushed the windows-ci branch 2 times, most recently from a4bf2e2 to 530586a Compare January 30, 2020 07:20
@rhysd
Copy link
Author

rhysd commented Jan 30, 2020

I fixed 21 failures but 4 failures are remaining. They look hard for me to fix since expectations are not clear for me.

https://github.com/rhysd/covimerage/runs/416658292?check_suite_focus=true

And there are a few test failures which may be related to #90.

>       assert exit_code == 0, (err, out)
E       AssertionError: ('Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
E         Python runtime state: preinitialized
E         
E         ', '')
E       assert 1 == 0
E         -1
E         +0

and

E       assert 'Error: The profile file (/not/used) has not been created.' in ['Running cmd: python -c \'import pty; pty.spawn([\'"\'"\'/bin/sh\'"\'"\', \'"\'"\'-c\'"\'"\', \'"\'"\'printf output; ..., '    import tty', '  File "c:\\hostedtoolcache\\windows\\python\\3.8.1\\x64\\Lib\\tty.py", line 5, in <module>', ...]
E        +  where ['Running cmd: python -c \'import pty; pty.spawn([\'"\'"\'/bin/sh\'"\'"\', \'"\'"\'-c\'"\'"\', \'"\'"\'printf output; ..., '    import tty', '  File "c:\\hostedtoolcache\\windows\\python\\3.8.1\\x64\\Lib\\tty.py", line 5, in <module>', ...] = <built-in method splitlines of str object at 0x000002435754ECA0>()
E        +    where <built-in method splitlines of str object at 0x000002435754ECA0> = 'Running cmd: python -c \'import pty; pty.spawn([\'"\'"\'/bin/sh\'"\'"\', \'"\'"\'-c\'"\'"\', \'"\'"\'printf output; e...   from termios import *\r\nModuleNotFoundError: No module named \'termios\'\r\nError: Command exited non-zero: 1.\r\n'.splitlines

@rhysd
Copy link
Author

rhysd commented Jan 30, 2020

'Better Code Hub' CI fails but I don't have permission to see the results.

Copy link
Member

@blueyed blueyed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good!
(sorry for the late response also)

Do you want to update it with regard to the token?
Otherwise I can also do it myself.

python-version: ${{ matrix.py }}
- name: Install tox
run: |
python -m pip install --upgrade pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to use the installed/stable pip. Not that important though for now.

# - uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# yml: .codecov.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@blueyed
Copy link
Member

blueyed commented Feb 15, 2020

'Better Code Hub' CI fails but I don't have permission to see the results.

You can ignore it, it's just an experiment.

@blueyed
Copy link
Member

blueyed commented Feb 15, 2020

Current status:

FAILED tests/test_cli.py::test_coverage_plugin_for_annotate_merged_conditionals
FAILED tests/test_cli.py::test_cli_xml - assert ('filename="%s' % local('D:\\...
FAILED tests/test_cli.py::test_run_handles_exit_code_from_python_pty_fd - ass...
FAILED tests/test_coveragepy.py::test_coveragewrapper_uses_config_file - json...
=================== 4 failed, 80 passed, 2 skipped in 8.23s ===================

https://github.com/rhysd/covimerage/runs/416658292?check_suite_focus=true

I can look into them during the next days.
I plan to spent some time for coverage 5 support here anyway soon.

@wsdjeg
Copy link

wsdjeg commented Aug 8, 2023

what's the status of this PR, is it able to be merged?

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.

3 participants