Files
pytorch/.travis.yml
Edward Yang 54abfda124 Completely synchronize behavior of Facebook flake8 and public flake8. (#18538)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18538
ghimport-source-id: 665b09f158d1c5dd94686d4212792504b55b7f73

Stack from [ghstack](https://github.com/ezyang/ghstack):
* **#18538 Completely synchronize behavior of Facebook flake8 and public flake8.**

Previously, developers at Facebook had the very funny experience
wherein /usr/local/bin/flake8 behaved differently than a freshly
installed flake8 from pip.  In this commit, I add enough ignores to
.flake8 and install enough plugins to make the Facebook flake8
and public flake8 line up exactly.  These means you don't have
to care which flake8 you use; they all will report accurate information
on your Python files.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Differential Revision: D14652336

fbshipit-source-id: ba7776eaa139cf2e3df2e65349da6fd7c99acca4
2019-03-27 19:51:21 -07:00

51 lines
1.7 KiB
YAML

# https://travis-ci.org/pytorch/pytorch
language: python
dist: trusty
git:
submodules: false
# This reportedly works around an issue downloading packages from pypi on
# travis. Consider removing this after the underlying issue is fixed.
# https://github.com/travis-ci/travis-ci/issues/2389
sudo: false
matrix:
fast_finish: true
include:
- name: "Ensure consistent CircleCI YAML"
python: "3.6"
dist: xenial
script: cd .circleci && ./ensure-consistency.py
- name: "Python 2.7 Lint"
python: "2.7"
install: pip install flake8
script: flake8
- name: "Python 3.7 Lint"
python: "3.7"
dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
sudo: required # required for Python 3.7 (travis-ci/travis-ci#9069)
install:
- pip install flake8 flake8-mypy flake8-comprehensions flake8-pyi mccabe pycodestyle pyflakes
# Apparently Facebook runs master of this one
# https://github.com/PyCQA/flake8-bugbear/issues/53
- pip install git+https://github.com/PyCQA/flake8-bugbear.git@d9444713a51a9fb6ee8cd2d88fca85e9ff0c2d58
script: flake8
- name: "MyPy typecheck"
python: "3.6"
install: pip install mypy mypy-extensions
script: mypy @mypy-files.txt
- name: "CPP doc check"
python: "3.6"
install:
- sudo apt-get install -y doxygen
- pip install -r requirements.txt
script: cd docs/cpp/source && ./check-doxygen.sh
- name: "clang tidy"
python: "3.6"
script: tools/run-clang-tidy-in-ci.sh
branches:
only:
- master
- /gh\/.*\/base/