Commit 87ffa07b authored by André Anjos's avatar André Anjos 💬

Simplify docker testing

parent 9dd0792a
...@@ -22,3 +22,9 @@ opsnr.stt ...@@ -22,3 +22,9 @@ opsnr.stt
.DS_Store .DS_Store
html/ html/
record.txt record.txt
_ci/
miniconda.sh
miniconda/
miniconda.cached/
conda/recipe_append.yaml
conda-bld/
...@@ -68,12 +68,16 @@ stages: ...@@ -68,12 +68,16 @@ stages:
stage: docker stage: docker
before_script: before_script:
# safe keep artifacts as before_build.sh will erase those... # safe keep artifacts as before_build.sh will erase those...
- cp -a ${CONDA_ROOT}/conda-bld/linux-64/*.tar.bz2 . - mv ${CONDA_ROOT}/conda-bld .
- ./_ci/install.sh _ci master #updates ci support scripts - ./_ci/install.sh _ci master #updates ci support scripts
- ./_ci/before_build.sh - ./_ci/before_build.sh
- mv conda-bld ${CONDA_ROOT}
- ./scripts/before_test.sh - ./scripts/before_test.sh
script: script:
- ./scripts/test.sh - export BEAT_DOCKER_TESTS=true
- BOB_TEST_ONLY=true ./_ci/build.sh
after_script:
- ./_ci/after_build.sh
build_linux_27: build_linux_27:
......
...@@ -53,7 +53,11 @@ test: ...@@ -53,7 +53,11 @@ test:
commands: commands:
- worker --help - worker --help
{% if environ.get('BEAT_DOCKER_TESTS', False) %}
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }}
{% else %}
- nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} --exclude=".*test_docker.*" - nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} --exclude=".*test_docker.*"
{% endif %}
- sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx
- sphinx-build -aEb doctest {{ project_dir }}/doc sphinx - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx
- conda inspect linkages -p $PREFIX {{ name }} # [not win] - conda inspect linkages -p $PREFIX {{ name }} # [not win]
......
...@@ -6,16 +6,6 @@ source ${basedir}/_ci/functions.sh ...@@ -6,16 +6,6 @@ source ${basedir}/_ci/functions.sh
REGISTRY="docker.idiap.ch" REGISTRY="docker.idiap.ch"
check_env REGISTRY check_env REGISTRY
# Makes sure we activate the base environment if available
run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh
run_cmd conda activate base
export_env PATH
# Run our docker-based tests for this package
run_cmd conda create --yes --name docker python=${PYTHON_VERSION}
run_cmd conda install --yes --name docker --use-local ${CI_PROJECT_NAME}-${BOB_PACKAGE_VERSION}-*.tar.bz2
run_cmd conda install --yes --name docker nose
# Select here images that are required for minimal operation (or tests) # Select here images that are required for minimal operation (or tests)
IMAGES=( IMAGES=(
"${REGISTRY}/beat/beat.env.system.python:1.3.0r0" "${REGISTRY}/beat/beat.env.system.python:1.3.0r0"
...@@ -88,3 +78,15 @@ if [ "$1" == "clean" ]; then ...@@ -88,3 +78,15 @@ if [ "$1" == "clean" ]; then
run_cmd rm -rf "${BEAT_CORE_TEST_DIR}/${algodir}/build/" run_cmd rm -rf "${BEAT_CORE_TEST_DIR}/${algodir}/build/"
done done
fi fi
# Makes sure we activate the base environment if available
run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh
run_cmd conda activate base
export_env PATH
for subchannel in linux-64 osx-64 noarch; do
if [ ! -d ${CONDA_ROOT}/conda-bld/${subchannel} ]; then
run_cmd mkdir -p ${CONDA_ROOT}/conda-bld/${subchannel}
fi
run_cmd conda index ${CONDA_ROOT}/conda-bld/${subchannel}
done
#!/usr/bin/env bash
basedir=`pwd`
source ${basedir}/_ci/functions.sh
# Makes sure we activate the base environment if available
run_cmd source ${CONDA_ROOT}/etc/profile.d/conda.sh
run_cmd conda activate base
export_env PATH
# Runs the complete test suite, including docker-based tests
run_cmd conda activate docker
run_cmd nosetests --with-coverage --cover-package=beat.core -sv beat.core
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment