Skip to content
Permalink
Browse files

add local job jenkins definition

  • Loading branch information...
sdpython committed Aug 20, 2018
1 parent 7e7a1f0 commit 62621b7236a6ab3491144bc8bca8d3855cf5e21c
Showing with 29 additions and 10 deletions.
  1. +27 −0 .local.jenkins.lin.yml
  2. +2 −10 _unittests/ut_documentation/test_run_notebooks.py
@@ -0,0 +1,27 @@

language: python

python:
- { PATH: "{{Python37}}", VERSION: 3.7, DIST: std, PYINT: python3.7 }

virtualenv:
- path: {{ospathjoin(root_path, pickname("$NAME_JENKINS", project_name + "_$VERSION_$DIST_$NAME"), "_venv")}}

install:
- $PYINT -c "from pip._internal import main;main(\"install --no-cache-dir --no-deps --index http://localhost:8067/simple/ jyquickhelper pyquickhelper --extra-index-url=https://pypi.python.org/simple/\".split())"
- $PYINT -c "from pip._internal import main;main(\"install -r requirements.txt\".split())"
- $PYINT --version
- $PYINT -c "from pip._internal import main;main([\"freeze\"])"

script:
- { CMD: "$PYINT -u setup.py unittests", NAME: "UT" }
- { CMD: "$PYINT -u setup.py unittests_LONG", NAME: "UT_LONG", TIMEOUT: 900}
- { CMD: "$PYINT -u setup.py unittests_SKIP", NAME: "UT_SKIP", TIMEOUT: 1500}

after_script:
- $PYINT -u setup.py bdist_wheel
- if [ ${VERSION} == "3.7" and ${DIST} != "conda" and ${NAME} == "UT" ] then cp dist/*.whl {{root_path}}/../local_pypi/local_pypi_server fi

documentation:
- if [ ${NAME} == "UT" ] then $PYINT -u setup.py build_sphinx fi
- if [ ${NAME} == "UT" ] then cp -R -f _doc/sphinxdoc/build/html dist/html fi
@@ -7,9 +7,8 @@
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, is_travis_or_appveyor
from pyquickhelper.pycode import get_temp_folder
from pyquickhelper.ipythonhelper import execute_notebook_list, execute_notebook_list_finalize_ut
from pyquickhelper.ipythonhelper import install_python_kernel_for_unittest


try:
@@ -37,13 +36,6 @@ def test_run_notebook(self):
self._testMethodName,
OutputPrint=__name__ == "__main__")

if sys.version_info[0] == 2:
# notebooks are not converted into python 2.7, so not tested
return

kernel_name = None if is_travis_or_appveyor() else install_python_kernel_for_unittest(
"pymyinstall")

temp = get_temp_folder(__file__, "temp_run_notebooks")

fnb = os.path.normpath(os.path.join(
@@ -79,7 +71,7 @@ def replace_cell(cell):

res = execute_notebook_list(
temp, keepnote, fLOG=fLOG, valid=valid, additional_path=addpaths,
kernel_name=kernel_name, clean_function=replace_cell)
clean_function=replace_cell)
execute_notebook_list_finalize_ut(
res, fLOG=fLOG, dump=src.pyensae)

0 comments on commit 62621b7

Please sign in to comment.
You can’t perform that action at this time.