forked from VimPlug/jedi
Try to get rid of tox and test directly with pytest
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,7 +2,6 @@
|
||||
*.sw?
|
||||
*.pyc
|
||||
.ropeproject
|
||||
.tox
|
||||
.coveralls.yml
|
||||
.coverage
|
||||
.idea
|
||||
|
||||
42
.travis.yml
42
.travis.yml
@@ -14,20 +14,27 @@ env:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: 3.7
|
||||
env:
|
||||
- TOXENV=cov-py37
|
||||
- JEDI_TEST_ENVIRONMENT=37
|
||||
# For now ignore pypy, there are so many issues that we don't really need
|
||||
# to run it.
|
||||
#- python: pypy
|
||||
# The 3.9 dev build does not seem to be available end 2019.
|
||||
#- python: 3.9-dev
|
||||
# env:
|
||||
# - JEDI_TEST_ENVIRONMENT=39
|
||||
- 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.
|
||||
- run: 'flake8 --extend-ignore F401 {posargs:jedi}'
|
||||
install:
|
||||
- pip install --quiet tox-travis
|
||||
- sudo apt-get -y install python3-venv
|
||||
- pip install .[testing]
|
||||
script:
|
||||
- |
|
||||
# Setup/install Python for $JEDI_TEST_ENVIRONMENT.
|
||||
@@ -57,13 +64,4 @@ script:
|
||||
fi
|
||||
fi
|
||||
set +ex
|
||||
- tox
|
||||
after_script:
|
||||
- |
|
||||
if [ $TOXENV == "cov-py37" ]; then
|
||||
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
|
||||
fi
|
||||
- pytest
|
||||
|
||||
@@ -6,7 +6,6 @@ include .coveragerc
|
||||
include sith.py
|
||||
include conftest.py
|
||||
include pytest.ini
|
||||
include tox.ini
|
||||
include requirements.txt
|
||||
recursive-include jedi/third_party *.pyi
|
||||
include jedi/third_party/typeshed/LICENSE
|
||||
|
||||
16
appveyor.yml
16
appveyor.yml
@@ -1,21 +1,17 @@
|
||||
environment:
|
||||
matrix:
|
||||
- TOXENV: py37
|
||||
PYTHON_PATH: C:\Python37
|
||||
- PYTHON_PATH: C:\Python37
|
||||
JEDI_TEST_ENVIRONMENT: 37
|
||||
- TOXENV: py37
|
||||
PYTHON_PATH: C:\Python37
|
||||
- PYTHON_PATH: C:\Python37
|
||||
JEDI_TEST_ENVIRONMENT: 36
|
||||
|
||||
- TOXENV: py36
|
||||
PYTHON_PATH: C:\Python36
|
||||
- PYTHON_PATH: C:\Python36
|
||||
JEDI_TEST_ENVIRONMENT: 37
|
||||
- TOXENV: py36
|
||||
PYTHON_PATH: C:\Python36
|
||||
- PYTHON_PATH: C:\Python36
|
||||
JEDI_TEST_ENVIRONMENT: 36
|
||||
install:
|
||||
- git submodule update --init --recursive
|
||||
- set PATH=%PYTHON_PATH%;%PYTHON_PATH%\Scripts;%PATH%
|
||||
- pip install tox
|
||||
- pip install .[testing]
|
||||
build_script:
|
||||
- tox
|
||||
- pytest
|
||||
|
||||
@@ -24,7 +24,7 @@ git checkout $BRANCH
|
||||
git submodule update --init
|
||||
|
||||
# Test first.
|
||||
tox
|
||||
pytest
|
||||
|
||||
# Create tag
|
||||
tag=v$(python3 -c "import $PROJECT_NAME; print($PROJECT_NAME.__version__)")
|
||||
|
||||
39
tox.ini
39
tox.ini
@@ -1,39 +0,0 @@
|
||||
[tox]
|
||||
envlist = py36, py37, py38, qa
|
||||
[testenv]
|
||||
extras = testing
|
||||
deps =
|
||||
# numpydoc for typing scipy stack
|
||||
numpydoc
|
||||
sphinx
|
||||
cov: coverage
|
||||
# Overwrite the parso version (only used sometimes).
|
||||
git+https://github.com/davidhalter/parso.git
|
||||
passenv = JEDI_TEST_ENVIRONMENT
|
||||
setenv =
|
||||
# https://github.com/tomchristie/django-rest-framework/issues/1957
|
||||
# tox corrupts __pycache__, solution from here:
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
# Enable all warnings.
|
||||
PYTHONWARNINGS=always
|
||||
# To test Jedi in different versions than the same Python version, set a
|
||||
# different test environment.
|
||||
env36: JEDI_TEST_ENVIRONMENT=36
|
||||
env37: JEDI_TEST_ENVIRONMENT=37
|
||||
env38: JEDI_TEST_ENVIRONMENT=38
|
||||
interpreter: JEDI_TEST_ENVIRONMENT=interpreter
|
||||
commands =
|
||||
pytest {posargs}
|
||||
[testenv:cov-py37]
|
||||
commands =
|
||||
coverage run --source jedi -m pytest {posargs}
|
||||
coverage report
|
||||
[testenv:sith]
|
||||
commands =
|
||||
{envpython} -c "import os; a='{envtmpdir}'; os.path.exists(a) or os.makedirs(a)"
|
||||
{envpython} sith.py --record {envtmpdir}/record.json random {posargs:jedi}
|
||||
[testenv:qa]
|
||||
# Ignore F401, which are unused imports. flake8 is a primitive tool and is sometimes wrong.
|
||||
commands = flake8 --extend-ignore F401 {posargs:jedi}
|
||||
deps =
|
||||
extras = qa
|
||||
Reference in New Issue
Block a user