-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add Windows to CI (plus associated fixes) #287
Changes from 15 commits
e97c46e
1759685
ff26db8
01a210e
d7dc7e2
224d1e8
00f3c0c
c974f05
0a2d65c
51b43c5
4314093
5d3d920
96d490f
411dcd2
daf3d01
9fb95e4
0f049d6
e20a790
55f4966
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,9 @@ def create_project(pyproject_path): | |
f.write("Adds levitation") | ||
|
||
call(["git", "init"]) | ||
# The default git branch name may not be master, let's make sure we | ||
# are consistent here. | ||
call(["git", "checkout", "-b", "master"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to pick master here? It wouldn't surprise me if the answer is yes because other things still assume/use master... But if it works to use some other name like "main" then maybe that would be a better choice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can switch it over. I think there was one test that explicitly passed master to towncrier as the reference branch. I could also just make the test check the primary branch before creating the 'PR' branch and then specify no name anywhere. I'll do one of the two unless you make a specific request. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I just removed this all together for now. This wasn't actually a Windows related issue and only showed up because I happened to install an updated Git in my Windows VM and allowed it to default to |
||
call(["git", "config", "user.name", "user"]) | ||
call(["git", "config", "user.email", "[email protected]"]) | ||
call(["git", "add", "."]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,9 +33,11 @@ deps = | |
commands = | ||
python -V | ||
coverage --version | ||
{envbindir}/trial --version | ||
python -m twisted.trial --version | ||
coverage erase | ||
coverage run -p {envbindir}/trial {posargs:towncrier} | ||
# coverage fails to run trial on Windows since it is trial.exe | ||
# so just use --module. | ||
coverage run -p --module twisted.trial {posargs:towncrier} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May not make any difference but this could also be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://tox.readthedocs.io/en/latest/config.html#conf-allowlist_externals Hmm, so tox only warns about outside access and doesn't, right there anyways, list an option to make that an error. Anyways, there are several other places this would apply in general so I won't change them here. I did update the comment to better represent coverage's perspective on the run subcommand. |
||
coverage combine -a | ||
|
||
[testenv:cov-report] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe link to a Trac ticket for Twisted... I am sure this will be fixed ... or maybe is already fixed and just waiting for a new release.
But maybe it is worth migrating towcrier tests to stdlib unit test. In this way we will not depend on twisted for running the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trial really has a bunch of nice facilities compared to stdlib unittest. There are other options, of course, like pytest and testtools, but you're going to run into exactly the same issues with anything that's not part of the stdlib itself.
As far as Twisted's 3.9 release goes, there's https://twistedmatrix.com/trac/ticket/10027 at least
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. Thanks for the link.