Commit 6beb1bba authored by Martin Reinecke's avatar Martin Reinecke

try new testing framework

parent 437a0d80
......@@ -11,8 +11,8 @@ stages:
- demo_runs
build_docker_from_scratch:
only:
- schedules
# only:
# - schedules
image: docker:stable
stage: build_docker
before_script:
......@@ -22,33 +22,33 @@ build_docker_from_scratch:
- docker build -t $CONTAINER_TEST_IMAGE --no-cache .
- docker push $CONTAINER_TEST_IMAGE
build_docker_from_cache:
except:
- schedules
image: docker:stable
stage: build_docker
before_script:
- ls
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
- docker build -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
#build_docker_from_cache:
# except:
# - schedules
# image: docker:stable
# stage: build_docker
# before_script:
# - ls
# script:
# - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
# - docker build -t $CONTAINER_TEST_IMAGE .
# - docker push $CONTAINER_TEST_IMAGE
test_python2_with_coverage:
stage: test
script:
- mpiexec -n 2 --bind-to none nosetests -q 2> /dev/null
- nosetests -q --with-coverage --cover-package=nifty5 --cover-erase
- mpiexec -n 2 --bind-to none pytest -q --cov=nifty5 2> /dev/null
- pytest -q --cov=nifty5 --cov-append test
- >
coverage report --omit "*plotting*,*distributed_do*"
coverage report --omit "*plotting*"
- >
coverage report --omit "*plotting*,*distributed_do*" | grep TOTAL | awk '{ print "TOTAL: "$4; }'
coverage report --omit "*plotting*" | grep TOTAL | awk '{ print "TOTAL: "$4; }'
test_python3:
stage: test
script:
- nosetests3 -q
- mpiexec -n 2 --bind-to none nosetests3 -q 2> /dev/null
- pytest-3 -q
- mpiexec -n 2 --bind-to none pytest-3 -q 2> /dev/null
pages:
stage: release
......
......@@ -10,8 +10,8 @@ RUN apt-get update && apt-get install -y \
# Documentation build dependencies
python-sphinx python-sphinx-rtd-theme python-numpydoc \
# Testing dependencies
python-nose python-parameterized \
python3-nose python3-parameterized \
python-pytest python-pytest-cov \
python3-pytest python3-pytest-cov \
# Optional NIFTy dependencies
openmpi-bin libopenmpi-dev python-mpi4py python3-mpi4py \
# Packages needed for NIFTy
......
......@@ -22,7 +22,7 @@ from test.common import expand
import nifty5 as ift
import numpy as np
from nose.plugins.skip import SkipTest
from unittest import SkipTest
from numpy.testing import assert_allclose, assert_equal
IC = ift.GradientNormController(tol_abs_gradnorm=1e-5, iteration_limit=1000)
......
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