Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
run unit tests outside of Docker build phase, since if tests fail the…
Browse files Browse the repository at this point in the history
…n there is no image and results can't be collected
  • Loading branch information
jaroslavl1 committed Aug 14, 2015
1 parent 50be631 commit 3bb2d2b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
12 changes: 8 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion distribution/release/nodejs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ RUN /tmp/setup.sh
WORKDIR /src

RUN grunt jshint
RUN grunt unit

CMD ["node", "/src/server.js"]
1 change: 0 additions & 1 deletion distribution/release/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ RUN /tmp/setup.sh
WORKDIR /src

RUN grunt jshint
RUN grunt unit

CMD ["node", "/src/server.js"]

0 comments on commit 3bb2d2b

Please sign in to comment.