diff options
Diffstat (limited to '.travis.yml')
| -rw-r--r-- | .travis.yml | 87 |
1 files changed, 51 insertions, 36 deletions
diff --git a/.travis.yml b/.travis.yml index f3b4857..5f92b62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,49 +1,64 @@ before_install: - - "pip install --upgrade pip wheel" +- pip install --upgrade-strategy eager -U pip wheel language: python -cache: apt -sudo: false -addons: - apt: - packages: - - language-pack-en-base - - language-pack-pl-base -python: - - "2.7" - - "3.3" - - "3.4" +cache: +- apt +- pip +dist: bionic matrix: include: - - python: "2.7" - env: NMODE=flake8 + - python: '3.5' + dist: xenial + - python: '3.6' + - python: '3.7' + - python: '3.8' + - os: osx + language: generic + env: NMODE=nikola OS=macOS + python: '3.8' + before_install: + - brew cask uninstall --force java + - brew update + - brew uninstall gdal postgis + - brew unlink python@2 + - brew upgrade python + - python3 -m venv nikola-tests-venv + - source nikola-tests-venv/bin/activate + - pip install --upgrade-strategy eager -U pip wheel + - python: '3.8' + env: NMODE=flake8 + - python: '3.8' + env: NMODE=basereq env: - NMODE=nikola + matrix: + - NMODE=nikola + global: + secure: GqUDW0j4Ay8pS9tS/g5JBYGtgBG0g0oD2g4X9JXgVchiFj3GIRL+dwiXpgx3LELy7nCWF3EzClFxxMdVqqxizQ/I8xqiA0XL/rf5z/y+9d9nmKOxV8SV73n0eCgsHWkbdSLJ6MKs6s0Trlz9jLu/P+Bhfu2ttqkOH8WttfEf3VE= install: - - "if [[ $NMODE == 'nikola' ]]; then scripts/getwheelhouse.sh $(scripts/getpyver.py short); fi" - - "if [[ $NMODE == 'nikola' ]]; then pip install -r requirements-tests.txt; if [[ \"$?\" == '1' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi" - - "if [[ $NMODE == 'nikola' ]]; then pip install .; fi" - - "if [[ $NMODE == 'nikola' ]]; then scripts/getbaseline.sh $(scripts/getpyver.py short); fi" - - "if [[ $NMODE == 'flake8' ]]; then pip install flake8 pep257; fi" -# We run tests and nikola (to see if the command is executable) OR flake8. -# We run `nikola` and `nikola help` because things may break due to human -# errors in argument parsing (cf. 96e78dd) -# WARNING: if you edit this, make sure to replicate your changes in dodo.py and appveyor.yml. +- if [[ $NMODE == 'nikola' ]]; then pip install --upgrade-strategy eager -Ur requirements-tests.txt; if [[ "$?" != '0' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi +- if [[ $NMODE == 'nikola' ]]; then pip install --upgrade-strategy eager -U codacy-coverage; if [[ "$?" != '0' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi +- if [[ $NMODE == 'basereq' ]]; then pip install --upgrade-strategy eager -Ur requirements.txt; if [[ "$?" != '0' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi +- if [[ $NMODE == 'nikola' || $NMODE == 'basereq' ]]; then pip install .; fi +- if [[ $NMODE == 'flake8' ]]; then pip install flake8 pydocstyle; fi script: - - "if [[ $NMODE == 'nikola' ]]; then py.test --doctest-modules nikola/; fi" - - "if [[ $NMODE == 'nikola' ]]; then py.test --cov nikola --cov-report term-missing tests/; fi" - - "if [[ $NMODE == 'nikola' ]]; then nikola; fi" - - "if [[ $NMODE == 'nikola' ]]; then nikola help; fi" - - "if [[ $NMODE == 'flake8' ]]; then flake8 nikola/; fi" - - "if [[ $NMODE == 'flake8' ]]; then pep257 --count --match-dir='(?!^\\\\.)(?!data).*' nikola/; fi" +- if [[ $NMODE == 'nikola' ]]; then py.test tests/; fi +- if [[ $NMODE == 'nikola' ]]; then nikola; fi +- if [[ $NMODE == 'nikola' ]]; then nikola help; fi +- if [[ $NMODE == 'nikola' ]]; then scripts/baseline.sh check; fi +- if [[ $NMODE == 'nikola' ]]; then scripts/codacy_coverage.sh; fi +- if [[ $NMODE == 'flake8' ]]; then flake8 nikola/ tests/; fi +- if [[ $NMODE == 'flake8' ]]; then pydocstyle --count --match-dir='(?!^\\.)(?!data).*' nikola/; fi +- if [[ $NMODE == 'basereq' ]]; then cd /; nikola help; fi +- if [[ $NMODE == 'basereq' ]]; then cd /tmp; nikola init -qd nsite; fi +- if [[ $NMODE == 'basereq' ]]; then cd /tmp/nsite; nikola build; fi after_success: - - "if [[ $NMODE == 'nikola' ]]; then coveralls; fi" notifications: irc: channels: - - "chat.freenode.net#nikola" + - chat.freenode.net#nikola template: - - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}" - - "Change view: %{compare_url}" - - "Build details: %{build_url}" - skip_join: true + - '%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}' + - 'Change view: %{compare_url}' + - 'Build details: %{build_url}' + skip_join: false use_notice: true |
