Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
6beb1bba
Commit
6beb1bba
authored
Jul 31, 2018
by
Martin Reinecke
Browse files
try new testing framework
parent
437a0d80
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
6beb1bba
...
...
@@ -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
nose
test
s
-q 2> /dev/null
-
nose
test
s
-q --
with-coverage --cover-package
=nifty5 --cov
er-erase
-
mpiexec -n 2 --bind-to none
py
test -q
--cov=nifty5
2> /dev/null
-
py
test -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
:
-
nose
test
s
3 -q
-
mpiexec -n 2 --bind-to none
nose
test
s
3 -q 2> /dev/null
-
py
test
-
3 -q
-
mpiexec -n 2 --bind-to none
py
test
-
3 -q 2> /dev/null
pages
:
stage
:
release
...
...
Dockerfile
View file @
6beb1bba
...
...
@@ -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-p
arameterized
\
python3-
nose
python3-p
arameterized
\
python-
pytest
python-p
ytest-cov
\
python3-
pytest
python3-p
ytest-cov
\
# Optional NIFTy dependencies
openmpi-bin libopenmpi-dev python-mpi4py python3-mpi4py \
# Packages needed for NIFTy
...
...
test/test_minimization/test_minimizers.py
View file @
6beb1bba
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment