mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Run CI tests against win32 and darwin platform (#3457)
Also use Python 3.8 as default Python version for tests
This commit is contained in:
committed by
Jelle Zijlstra
parent
05780a0d11
commit
66778639a5
14
.travis.yml
14
.travis.yml
@@ -1,6 +1,6 @@
|
||||
dist: bionic
|
||||
language: python
|
||||
python: 3.7
|
||||
python: 3.8
|
||||
|
||||
jobs:
|
||||
include:
|
||||
@@ -11,11 +11,17 @@ jobs:
|
||||
- name: "mypy (typed-ast)"
|
||||
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
|
||||
script: ./tests/mypy_test.py --platform=linux
|
||||
- name: "mypy (ast)"
|
||||
python: 3.8-dev
|
||||
python: 3.8
|
||||
install: pip install -U git+git://github.com/python/mypy
|
||||
script: ./tests/mypy_test.py
|
||||
script: ./tests/mypy_test.py --platform=linux
|
||||
- name: "mypy (Windows)"
|
||||
install: pip install -U git+git://github.com/python/mypy
|
||||
script: ./tests/mypy_test.py --platform=win32
|
||||
- name: "mypy (Darwin)"
|
||||
install: pip install -U git+git://github.com/python/mypy
|
||||
script: ./tests/mypy_test.py --platform=darwin
|
||||
- name: "mypy self test"
|
||||
script: ./tests/mypy_selftest.py
|
||||
- name: "check file consistency"
|
||||
|
||||
@@ -24,6 +24,8 @@ parser.add_argument('-n', '--dry-run', action='store_true', help="Don't actually
|
||||
parser.add_argument('-x', '--exclude', type=str, nargs='*', help="Exclude pattern")
|
||||
parser.add_argument('-p', '--python-version', type=str, nargs='*',
|
||||
help="These versions only (major[.minor])")
|
||||
parser.add_argument('--platform',
|
||||
help="Run mypy for a certain OS platform (defaults to sys.platform)")
|
||||
parser.add_argument('--warn-unused-ignores', action='store_true',
|
||||
help="Run mypy with --warn-unused-ignores "
|
||||
"(hint: only get rid of warnings that are "
|
||||
@@ -135,6 +137,8 @@ def main():
|
||||
flags.append('--disallow-any-generics')
|
||||
if args.warn_unused_ignores:
|
||||
flags.append('--warn-unused-ignores')
|
||||
if args.platform:
|
||||
flags.extend(['--platform', args.platform])
|
||||
sys.argv = ['mypy'] + flags + files
|
||||
if args.verbose:
|
||||
print("running", ' '.join(sys.argv))
|
||||
|
||||
Reference in New Issue
Block a user