Closed stevepiercy closed 3 years ago
YES! Coverage is now working properly with GitHub actions. See https://github.com/Pylons/webtest/runs/1389849103?check_suite_focus=true#step:5:283
I tried to add in macos and windows, but I give up. I'm not deeply familiar with the requirements on these OSes to get the builds to pass. It would have been a nice addition.
Anyway, this PR is now ready for review.
The windows errors are due to git automatically changing the line ending on files to match the system it is being checked out on. So on Windows it will silently turn \n
into \r\n
.
This issue was also happening in Pyramid when testing on Windows, you can use a .gitattributes
file to fix this:
https://github.com/Pylons/pyramid/blob/master/.gitattributes
For example.
The windows errors are due to git automatically changing the line ending on files to match the system it is being checked out on. So on Windows it will silently turn
\n
into\r\n
.This issue was also happening in Pyramid when testing on Windows, you can use a
.gitattributes
file to fix this:https://github.com/Pylons/pyramid/blob/master/.gitattributes
I never would have figured that out. Thank you! Fixed in 8e3a168.
That leaves coverage as the sole failing build, which is fine for this PR.
Hi, nice work. Can you explain why it's ok for the coverage to fail ? (logs are no longer available)
Coverage has been broken for at least 7 years. This PR exposes the coverage failures that previously were failing but were reported as passing because there was no --fail-under=100
argument in the automated testing.
That said, the missing coverage should be added in a separate PR. This PR only exposes that coverage was missing.
The logs for the test run are still available (latest on this PR):
2020-11-13T22:32:45.5479953Z Name Stmts Miss Cover Missing
2020-11-13T22:32:45.5483892Z ---------------------------------------------------
2020-11-13T22:32:45.5484203Z webtest/__init__.py 15 0 100%
2020-11-13T22:32:45.5484535Z webtest/app.py 337 2 99% 271, 450
2020-11-13T22:32:45.5484864Z webtest/compat.py 17 0 100%
2020-11-13T22:32:45.5485228Z webtest/debugapp.py 60 0 100%
2020-11-13T22:32:45.5485575Z webtest/ext.py 3 0 100%
2020-11-13T22:32:45.5486190Z webtest/forms.py 352 12 97% 90, 117, 252, 273, 278, 287, 465, 472, 572-576
2020-11-13T22:32:45.5486549Z webtest/http.py 85 0 100%
2020-11-13T22:32:45.5486922Z webtest/lint.py 225 27 88% 315, 325, 329, 346, 352, 357, 371, 376, 382, 388, 394, 403, 412, 420, 425, 431, 438, 443, 463, 469, 484, 491, 496, 499, 509, 549, 562
2020-11-13T22:32:45.5487509Z webtest/response.py 232 5 98% 456, 485-491
2020-11-13T22:32:45.5487878Z webtest/sel.py 6 0 100%
2020-11-13T22:32:45.5488417Z webtest/utils.py 101 7 93% 41-42, 98, 118, 130, 133, 166
2020-11-13T22:32:45.5488882Z ---------------------------------------------------
2020-11-13T22:32:45.5489123Z TOTAL 1433 53 96%
2020-11-13T22:32:45.5489691Z Coverage failure: total of 96 is less than fail-under=100
The logs for the test run are still available (latest on this PR):
All log history prior to the switch to travis-ci.com are available under the travis-ci.org domain:
I see, thanks. Not sure we'll be back to 100% one day...
Before this is merged, if getting back to 100% is not a requirement, the fail flag should be removed.
Instead of its removal, I could change it to --fail-under=96
to prevent further erosion of coverage. Then as coverage improves through PRs, we can bump it up.
I could also try to steer contributors to WebTest as a good first PR. The upcoming PloneConf sprints could be one opportunity.
@gawel it's your call.
@stevepiercy +1 for the 96% option
@gawel done! Coverage is now "passing" at 96%.
See also #230.