summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..0091119
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,35 @@
+os: linux
+dist: focal
+cache: pip
+language: python
+
+jobs:
+ include:
+ - python: 3.8
+ - python: 3.7
+ - python: 3.6
+
+install:
+ - pip install . black coverage codecov flake8 isort mypy pytest readme_renderer
+ - pip list
+
+script:
+ - echo "$TRAVIS_PYTHON_VERSION"
+ - flake8 prompt_toolkit
+ - coverage run -m pytest
+
+ # Run type checker.
+ - mypy prompt_toolkit
+
+ # Check wheather the imports were sorted correctly.
+ # When this fails, please run ./tools/sort-imports.sh
+ - isort -c -rc --profile black prompt_toolkit examples tests setup.py
+
+ - black --check prompt_toolkit examples tests setup.py
+
+ # Ensure that the README renders correctly (required for uploading to PyPI).
+ - python -m readme_renderer README.rst > /dev/null
+
+
+after_success:
+ - codecov