Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
add local job jenkins definition
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Aug 20, 2018
1 parent 7e7a1f0 commit 62621b7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
27 changes: 27 additions & 0 deletions .local.jenkins.lin.yml
Original file line number Original file line Diff line number Diff line change
@@ -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
12 changes: 2 additions & 10 deletions _unittests/ut_documentation/test_run_notebooks.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
import os import os
import unittest import unittest
from pyquickhelper.loghelper import fLOG 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 execute_notebook_list, execute_notebook_list_finalize_ut
from pyquickhelper.ipythonhelper import install_python_kernel_for_unittest




try: try:
Expand Down Expand Up @@ -37,13 +36,6 @@ def test_run_notebook(self):
self._testMethodName, self._testMethodName,
OutputPrint=__name__ == "__main__") 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") temp = get_temp_folder(__file__, "temp_run_notebooks")


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


res = execute_notebook_list( res = execute_notebook_list(
temp, keepnote, fLOG=fLOG, valid=valid, additional_path=addpaths, 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( execute_notebook_list_finalize_ut(
res, fLOG=fLOG, dump=src.pyensae) res, fLOG=fLOG, dump=src.pyensae)


Expand Down

0 comments on commit 62621b7

Please sign in to comment.