Skip to content

Commit

Permalink
Run tests on the docker image to validate it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Aug 8, 2017
1 parent efa7b53 commit 9eec8f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -73,3 +73,9 @@ distclean: clean

maintainer-clean: distclean
rm -fr .venv/ .tox/

docker-build:
docker build -t mozilla/pollbot .

docker-test:
docker run -it mozilla/pollbot /bin/bash /app/scripts/run-tests.sh
2 changes: 1 addition & 1 deletion circle.yml
Expand Up @@ -42,7 +42,7 @@ dependencies:

test:
override:
- 'true'
- docker run -it app /bin/bash /app/scripts/run-tests.sh

# appropriately tag and push the container to dockerhub
deployment:
Expand Down
6 changes: 6 additions & 0 deletions scripts/run-tests.sh
@@ -0,0 +1,6 @@
#!/bin/bash
# Run tests in the docker image
python3 -m venv /tmp/tests
/tmp/tests/bin/pip install -r /app/dev-requirements.txt
/tmp/tests/bin/pip install /app
/tmp/tests/bin/py.test /app/tests

0 comments on commit 9eec8f7

Please sign in to comment.