Manishearth / ChatExchange

A Python API for talking to Stack Exchange chat
Apache License 2.0
65 stars 36 forks source link

Github Actions: Create lint+test.yml action #165

Closed tripleee closed 2 years ago

tripleee commented 2 years ago

This implements CI testing on GithubActions as proposed in #162

I'm using https://github.com/actions/setup-python and basically took their basic matrix example. (Earlier, back in August, I tried a different tool based on pyenv, but that was a no go for several reasons.)

This does not yet cover all the tasks which were done in the old CI (epydoc etc) so I am not replacing that file just yet; but this closes #162 specifically, and lays the groundwork for replacing the remaining actions with Github Actions.

Unfortunately, Github Actions does not offer Python 3.4 on Ubuntu, so I left that out of the test matrix. There are a few other test cases which are commented out but in general I managed to get a test on either native Python or PyPy for all the other supported versions. (Perhaps it would be time to consider dropping 3.4 anyway? Though I believe it could be supported by adding an older Ubuntu version, or Windows, to the test matrix.) For the list of supported versions, see https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

This is a merge from my master branch because that was the only way to test exactly the integration I wanted to test. You can see results in https://github.com/tripleee/ChatExchange/actions (and also, unfortunately, several of my struggles to find what would work through trial and error :-)

For what it's worth, the flake8 test runs with a very narrow set of conditions for hard failures, then runs again in report-only mode and shows quite a number of problems. This threw me off at first because I was left wondering why it didn't fail in spite of all those flake8 errors ...

tripleee commented 2 years ago

Thanks for the quick merge! Any chance you could grant me a hacktoberfest-accepted label?

Undo1 commented 2 years ago

Someone's gunning for a t-shirt!

tripleee commented 2 years ago

For the record, the T-shirt finally arrived a few weeks ago. #172 finally fixes the flake8 problems in a hopefully sustainable fashion.