| # vim ft=yaml | |
| # Multiple lines can be made a single "virtual line" because of how Travis | |
| # munges each line before executing it to print out the exit status. It's okay | |
| # for it to be on multiple physical lines, so long as you remember: - There | |
| # can't be any leading "-"s - All newlines will be removed, so use ";"s | |
| dist: bionic | |
| language: python | |
| cache: pip | |
| python: | |
| - 2.7 | |
| - 3.5 | |
| - 3.6 | |
| - 3.7 | |
| - 3.8 | |
| env: | |
| REQUIRE_ASPELL=true | |
| addons: | |
| apt: | |
| packages: | |
| - libaspell-dev | |
| - aspell-en | |
| before_install: | |
| - source tools/travis_tools.sh | |
| - SRC_DIR=$PWD | |
| - cd ~ | |
| - virtualenv --python=python venv | |
| - source venv/bin/activate | |
| - python --version # just to check | |
| - pip install -U pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors | |
| - retry pip install pytest pytest-cov flake8 coverage codecov chardet setuptools docutils | |
| - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then retry pip install aspell-python-py2; fi | |
| - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "3" ]; then retry pip install aspell-python-py3; fi | |
| - cd $SRC_DIR | |
| - wget "http://app.aspell.net/create?max_size=95&spelling=US&spelling=GBs&spelling=GBz&spelling=CA&spelling=AU&max_variant=2&diacritic=both&special=hacker&special=roman-numerals&encoding=utf-8&format=inline&download=aspell" -O customdict.tar.bz2 | |
| - tar xjf customdict.tar.bz2 | |
| - cd aspell6-en-custom | |
| - ./configure | |
| - make | |
| - cd $SRC_DIR | |
| install: | |
| - python setup.py install | |
| script: | |
| - codespell --help | |
| - make check-dictionary | |
| - codespell --skip="codespell_lib/tests/test_basic.py,codespell_lib/data/*" codespell_lib/ | |
| # this file has an error | |
| - "! codespell codespell_lib/tests/test_basic.py" | |
| - flake8 | |
| - if [ "$TRAVIS_PYTHON_VERSION" != "2.7" ]; then | |
| python setup.py check --restructuredtext --strict; | |
| fi; | |
| - pytest codespell_lib | |
| after_success: | |
| - codecov |