-
Notifications
You must be signed in to change notification settings - Fork 75
Add simple test workflow #44
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
Conversation
|
NB: a couple of tests fail right now for me running on GitHub. |
|
Hi @StevenMaude , These are intentional (that is, those tests are expected to fail). So nothing to worry about. ;)
|
|
Hi @ParticularMiner - Sorry i guess I missed this when merging the PR's - we should not have failing tests. That kind of defeats the purpose of unittests as a way to quickly identify new issues. These two are fixed easily by changing assertEqual to assertNotEqual and assertTrue to assertFalse. I can do that now and update the pypi version as well. @StevenMaude thanks for this! We are using codecov as well, but it is currently not automated yet. Is that something you can add as well? |
|
Hi @Bergvca, I completely agree that all tests should pass. Actually, it feels better that way to me too. But I'm still getting used to the philosophy of unit-tests so I wasn't sure, otherwise I would have checked with you again about them myself. |
|
Hi @StevenMaude Sorry, I too should have thanked you before for this. Indeed it would certainly be great if the code coverage report and badge could be automated through a GitHub test workflow.. Very handy and professional! I'm eager to see how that is done. By the way, could you also try automating the test on a Windows 10 operating system, because on my Windows 10 laptop two more test-units (not written by me) fail due to an integer datatype mismatch (a bug which seems to be well-known in the python community). See the following link for a description: https://stackoverflow.com/questions/57803232/interpreting-numpy-int64-datatype-as-native-int-datatype-in-python-on-windows-x6 |
|
I hereby provide the message-logs for the two additional failing tests: |
|
@Bergvca @ParticularMiner Thanks for looking at the PR 👀 And, of course, for working on the library, which I'd been using and thought it was worth maybe making a small contribution back 👍 Good questions which are slightly on the edge of my knowledge 🙂
I'll try take a look at these over the next week, though it may be next weekend when I can spend a bit more time checking up on these. |
|
Many thanks @StevenMaude for the very useful links. I might try them out myself. |
|
I agree with your intuition for separate actions. It appears Github allows multiple actions, right? Anyway, a modular design structure for pretty much anything is often a good idea. |
|
I rebased this branch on current The tests now run on Windows too, but they fail as per the comment above. |
|
Excellent! Many thanks @StevenMaude ! How do I get your GitHub actions into my own fork of this repository? Do you need to create a PR for it on my branch too? |
I figured it out. I seem to have fixed the Windows 10 problem too (for now). |
Responding to your question seeing as I was already writing the response. At the command-line, the way I would do this is probably something like:
If you're working in GitHub's web UI, I'm not sure there is an easy way beyond copy-paste. Anyway, you got something working well enough 🙂 |
|
While I'm here, I'll also add that a codecov workflow could be a separate PR, as another feature. |
|
Thanks @StevenMaude I ended up using the GitHub web GUI but the git method is also useful to know.
|
For your information, clicking on the codecov badge on README.md will eventually lead you to an old code coverage report at https://codecov.io/gh/Bergvca/string_grouper |
|
Thanks guys! I will merge this now - agreed that codecov should be a seperate PR |
Run tests on pull requests, and on push to main branch.