Simplify Travis-CI configuration#3220
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.
bluetech
left a comment
There was a problem hiding this comment.
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.
| python: 3.7 | ||
|
|
||
| matrix: | ||
| jobs: |
There was a problem hiding this comment.
Does this have any significance or are they the same?
There was a problem hiding this comment.
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.
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.
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.
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.
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.
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.
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.
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.