mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-05 11:47:38 +08:00
No fixes yet, this just gets the config in place. Note: I'm assuming that we'll pick up a change to parso such that it exposes its type stubs here. Otherwise we'll want to tweak the imports config to ignore those errors.
69 lines
2.4 KiB
YAML
69 lines
2.4 KiB
YAML
dist: xenial
|
|
language: python
|
|
python:
|
|
- 3.9-dev
|
|
- 3.8
|
|
- 3.7
|
|
- 3.6
|
|
|
|
env:
|
|
- JEDI_TEST_ENVIRONMENT=38
|
|
- JEDI_TEST_ENVIRONMENT=37
|
|
- JEDI_TEST_ENVIRONMENT=36
|
|
- JEDI_TEST_ENVIRONMENT=interpreter
|
|
|
|
matrix:
|
|
include:
|
|
- python: 3.8
|
|
script:
|
|
- 'pip install coverage'
|
|
- 'coverage run --source jedi -m pytest'
|
|
- 'coverage report'
|
|
after_script:
|
|
- |
|
|
pip install --quiet codecov coveralls
|
|
coverage xml
|
|
coverage report -m
|
|
coveralls
|
|
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -X search -X fix -X xcode -f coverage.xml
|
|
- python: 3.8
|
|
install:
|
|
- 'pip install .[qa]'
|
|
script:
|
|
# Ignore F401, which are unused imports. flake8 is a primitive tool and is sometimes wrong.
|
|
- 'flake8 --extend-ignore F401 jedi setup.py'
|
|
- 'mypy jedi'
|
|
install:
|
|
- sudo apt-get -y install python3-venv
|
|
- pip install .[testing]
|
|
script:
|
|
- |
|
|
# Setup/install Python for $JEDI_TEST_ENVIRONMENT.
|
|
set -ex
|
|
test_env_version=${JEDI_TEST_ENVIRONMENT:0:1}.${JEDI_TEST_ENVIRONMENT:1:1}
|
|
if [ "$TRAVIS_PYTHON_VERSION" != "$test_env_version" ] && [ "$JEDI_TEST_ENVIRONMENT" != "interpreter" ]; then
|
|
python_bin=python$test_env_version
|
|
python_path="$(which $python_bin || true)"
|
|
if [ -z "$python_path" ]; then
|
|
# Only required for JEDI_TEST_ENVIRONMENT=38, because it's not always
|
|
# available.
|
|
download_name=python-$test_env_version
|
|
wget https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/16.04/x86_64/$download_name.tar.bz2
|
|
sudo tar xjf $download_name.tar.bz2 --directory / opt/python
|
|
ln -s "/opt/python/${test_env_version}/bin/python" /home/travis/bin/$python_bin
|
|
elif [ "${python_path#/opt/pyenv/shims}" != "$python_path" ]; then
|
|
# Activate pyenv version (required with JEDI_TEST_ENVIRONMENT=36).
|
|
pyenv_bin="$(pyenv whence --path "$python_bin" | head -n1)"
|
|
ln -s "$pyenv_bin" /home/travis/bin/$python_bin
|
|
fi
|
|
$python_bin --version
|
|
python_ver=$($python_bin -c 'import sys; print("%d%d" % sys.version_info[0:2])')
|
|
if [ "$JEDI_TEST_ENVIRONMENT" != "$python_ver" ]; then
|
|
echo "Unexpected Python version for $JEDI_TEST_ENVIRONMENT: $python_ver"
|
|
set +ex
|
|
exit 2
|
|
fi
|
|
fi
|
|
set +ex
|
|
- pytest
|