-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Simplify Travis-CI configuration #3220
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
This removes the indirection of setting environment variables to install and run tests. Also, use an explicit version for running mypy with typed-ast.
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.
TEST_CMD
does seem like an unhelpful indirection.
However, the INSTALL
does avoid some repetition, so seems helpful to keep?
Also, use an explicit version for running mypy with typed-ast.
This sounds good for future proofing.
@@ -2,34 +2,24 @@ dist: bionic | |||
language: python | |||
python: 3.7 | |||
|
|||
matrix: | |||
jobs: |
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.
Does this have any significance or are they the same?
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.
As far as I understand it, they are different indeed: In a matrix build, every possible combination of configurations is run, jobs are more straight-forward. Since in our case each jobs is quite different from the others, a matrix build does not make much sense.
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.
Got it, jobs does sound more appropriate.
env: | ||
- TEST_CMD="./tests/mypy_test.py" | ||
- INSTALL="mypy" | ||
install: pip install -U git+git://github.com/python/mypy |
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.
Are you sure typed_ast
should be removed here? As I understand it, mypy still depends on it even on 3.8.
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.
That doesn't seem to be the case, since the build succeeds. At least at runtime it should not need it.
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.
Didn't check but it probably installs typed_ast
from PyPI because it is a dependency of mypy. But the intention was to check with the git typed_ast
.
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.
I just looked at the travis log. It is indeed installing typed-ast from pypi, but I assume that it will not get used by mypy.
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.
I asked about it here -- according to the replies, it it still needed in Python 3.8 to parse Python 2 code.
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.
Ah, good point. But this shouldn't be a problem for us, since we are only parsing stubs and are not running mypy in Python 2 mode. I think using typed-ast from pypi is fine, but in the end it doesn't matter much, especially considering that typed-ast will probably not be developed any further.
I actually think it might be beneficial to use typed-ast from pypi in the < 3.8 test, but that's a discussion for another PR.
Concerning |
It also deduplicates the |
This removes the indirection of setting environment variables to
install and run tests. Also, use an explicit version for running
mypy with typed-ast.