ci: Travis: Ubuntu Xenial, and pynvim (#908)

This commit is contained in:
Daniel Hahler
2019-02-05 20:03:33 +01:00
committed by GitHub
parent f36749776d
commit c5c13d69d6
2 changed files with 29 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
sudo: false dist: xenial
language: python language: python
python: 3.6 python: 3.7
env: env:
matrix: matrix:
- ENV=test - ENV=test
@@ -13,20 +13,22 @@ matrix:
install: install:
- | - |
if [ "$ENV" = "test" ]; then if [ "$ENV" = "test" ]; then
python3.6 -m pip install pytest pip install pytest
fi elif [ "$ENV" = "test_coverage" ]; then
- | sudo add-apt-repository ppa:neovim-ppa/stable -y
# https://github.com/neovim/bot-ci#generated-builds sudo apt-get update -q
if [ "$ENV" = "test_coverage" ]; then sudo apt-get install neovim -y
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
pip --version pip install pynvim pytest-cov
pip install neovim pytest-cov
else else
vim --version vim --version
fi fi
script: script:
- make --keep-going "$ENV" - make --keep-going "$ENV" BUILD_VIRTUAL_ENV=$VIRTUAL_ENV
after_success: after_success:
- coverage xml - |
- bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -X fix -X search -X xcode -f coverage.xml -F py${TRAVIS_PYTHON_VERSION//./} if [ "$ENV" = "test_coverage" ]; then
coverage xml
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -X fix -X search -X xcode -f coverage.xml -F py${TRAVIS_PYTHON_VERSION//./}
fi

View File

@@ -1,3 +1,5 @@
BUILD_VIRTUAL_ENV:=build/venv
test: test:
pytest pytest
@@ -7,23 +9,23 @@ test_nvim:
test_coverage: export PYTEST_ADDOPTS:=--cov pythonx --cov test --cov-report=term-missing:skip-covered test_coverage: export PYTEST_ADDOPTS:=--cov pythonx --cov test --cov-report=term-missing:skip-covered
test_coverage: test_nvim test_coverage: test_nvim
build: $(dir $(BUILD_VIRTUAL_ENV)):
mkdir $@ mkdir -p $@
build/venv: | build $(BUILD_VIRTUAL_ENV): | $(dir $(BUILD_VIRTUAL_ENV))
virtualenv -p python3.6 $@ python -m venv $@
build/venv/bin/vint: | build/venv $(BUILD_VIRTUAL_ENV)/bin/vint: | $(BUILD_VIRTUAL_ENV)
$|/bin/pip install -q vim-vint==0.3.19 $|/bin/python -m pip install vim-vint==0.3.19
build/venv/bin/flake8: | build/venv $(BUILD_VIRTUAL_ENV)/bin/flake8: | $(BUILD_VIRTUAL_ENV)
$|/bin/pip install -q flake8==3.5.0 $|/bin/python -m pip install -q flake8==3.5.0
vint: build/venv/bin/vint vint: $(BUILD_VIRTUAL_ENV)/bin/vint
build/venv/bin/vint after autoload ftplugin plugin $(BUILD_VIRTUAL_ENV)/bin/vint after autoload ftplugin plugin
flake8: build/venv/bin/flake8 flake8: $(BUILD_VIRTUAL_ENV)/bin/flake8
build/venv/bin/flake8 pythonx/jedi_*.py $(BUILD_VIRTUAL_ENV)/bin/flake8 pythonx/jedi_*.py
check: vint flake8 check: vint flake8