-
-
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
Changes from all commits
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 |
---|---|---|
|
@@ -2,34 +2,24 @@ dist: bionic | |
language: python | ||
python: 3.7 | ||
|
||
matrix: | ||
jobs: | ||
include: | ||
- name: "pytype" | ||
python: 3.6 | ||
env: | ||
- TEST_CMD="./tests/pytype_test.py" | ||
- INSTALL="test" | ||
install: pip install -r requirements-tests-py3.txt | ||
script: ./tests/pytype_test.py | ||
- name: "mypy (typed-ast)" | ||
env: | ||
- TEST_CMD="./tests/mypy_test.py" | ||
- INSTALL="mypy" | ||
python: 3.7 | ||
install: pip install -U git+git://github.com/python/mypy git+git://github.com/python/typed_ast | ||
script: ./tests/mypy_test.py | ||
- name: "mypy (ast)" | ||
python: 3.8-dev | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure 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. 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 commentThe reason will be displayed to describe this comment to others. Learn more. Didn't check but it probably installs 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 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 commentThe 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 commentThe 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. |
||
script: ./tests/mypy_test.py | ||
- name: "mypy self test" | ||
env: TEST_CMD="./tests/mypy_selftest.py" | ||
script: ./tests/mypy_selftest.py | ||
- name: "check file consistency" | ||
env: TEST_CMD="./tests/check_consistent.py" | ||
script: ./tests/check_consistent.py | ||
- name: "flake8" | ||
env: | ||
- TEST_CMD="flake8" | ||
- INSTALL="test" | ||
|
||
install: | ||
- if [[ $INSTALL == 'test' ]]; then pip install -r requirements-tests-py3.txt; fi | ||
- if [[ $INSTALL == 'mypy' ]]; then pip install -U git+git://github.com/python/mypy git+git://github.com/python/typed_ast; fi | ||
|
||
script: | ||
- $TEST_CMD | ||
install: pip install -r requirements-tests-py3.txt | ||
script: flake8 |
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.