From 3bb2d2b4421aeee6889b2fe6f9eb7c3e8eea0ef7 Mon Sep 17 00:00:00 2001 From: Jaroslav Libak Date: Fri, 14 Aug 2015 16:00:48 +0200 Subject: [PATCH] run unit tests outside of Docker build phase, since if tests fail then there is no image and results can't be collected --- circle.yml | 12 ++++++++---- distribution/release/nodejs/Dockerfile | 1 - distribution/release/python/Dockerfile | 1 - 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/circle.yml b/circle.yml index a028683..0045227 100644 --- a/circle.yml +++ b/circle.yml @@ -8,16 +8,20 @@ dependencies: test: override: - docker run -d -e RABBITMQ_PASS="mypass" --name rabbitmq gaiaadm/rabbitmq; sleep 10 - # run system tests on pure Node.js image - - docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="mypass" --link rabbitmq:amqserver --name system-test-runner gaiaadm/result-processing:$BUILD_TAG grunt system + # run unit tests on pure Node.js image + - docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="mypass" --link rabbitmq:amqserver --name unit-test-runner gaiaadm/result-processing:$BUILD_TAG grunt unit - docker cp system-test-runner:/src/unit-test-results.xml $CIRCLE_TEST_REPORTS/nodejs - docker cp system-test-runner:/src/unit-test-results.txt $CIRCLE_ARTIFACTS/nodejs + # run system tests on pure Node.js image + - docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="mypass" --link rabbitmq:amqserver --name system-test-runner gaiaadm/result-processing:$BUILD_TAG grunt system - docker cp system-test-runner:/src/system-test-results.xml $CIRCLE_TEST_REPORTS/nodejs - docker cp system-test-runner:/src/system-test-results.txt $CIRCLE_ARTIFACTS/nodejs - # run system tests on Python image - - docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="mypass" --link rabbitmq:amqserver --name system-test-runner-python gaiaadm/result-processing:$BUILD_TAG-python grunt system + # run unit tests on Python image + - docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="mypass" --link rabbitmq:amqserver --name unit-test-runner-python gaiaadm/result-processing:$BUILD_TAG-python grunt unit - docker cp system-test-runner-python:/src/unit-test-results.xml $CIRCLE_TEST_REPORTS/python - docker cp system-test-runner-python:/src/unit-test-results.txt $CIRCLE_ARTIFACTS/python + # run system tests on Python image + - docker run -e AMQ_USER="admin" -e AMQ_PASSWORD="mypass" --link rabbitmq:amqserver --name system-test-runner-python gaiaadm/result-processing:$BUILD_TAG-python grunt system - docker cp system-test-runner-python:/src/system-test-results.xml $CIRCLE_TEST_REPORTS/python - docker cp system-test-runner-python:/src/system-test-results.txt $CIRCLE_ARTIFACTS/python deployment: diff --git a/distribution/release/nodejs/Dockerfile b/distribution/release/nodejs/Dockerfile index bf43ed2..6ff76a8 100644 --- a/distribution/release/nodejs/Dockerfile +++ b/distribution/release/nodejs/Dockerfile @@ -13,6 +13,5 @@ RUN /tmp/setup.sh WORKDIR /src RUN grunt jshint -RUN grunt unit CMD ["node", "/src/server.js"] diff --git a/distribution/release/python/Dockerfile b/distribution/release/python/Dockerfile index fe605f2..62abe6e 100644 --- a/distribution/release/python/Dockerfile +++ b/distribution/release/python/Dockerfile @@ -13,6 +13,5 @@ RUN /tmp/setup.sh WORKDIR /src RUN grunt jshint -RUN grunt unit CMD ["node", "/src/server.js"]