forked from vstconsulting/polemarch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-tests.rpm.yml
36 lines (36 loc) · 1.13 KB
/
docker-compose-tests.rpm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: '3.3'
services:
db-server:
container_name: dbtest
image: mysql:latest
environment:
- MYSQL_DATABASE=polemarch
- MYSQL_ROOT_PASSWORD=polemarch
- MYSQL_USER=polemarch
- MYSQL_PASSWORD=polemarch
volumes:
- type: tmpfs
target: /var/lib/mysql
memcache-server:
container_name: cachetest
image: memcached
polemarch_test_rpm:
build:
context: .
dockerfile: docker/Dockerfile.test.rpm
entrypoint: /bin/bash -c "/bin/bash -c \"$${@}\""
command: |
/bin/bash -c "
set -e
curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > wait-for-it.sh
chmod +x wait-for-it.sh
./wait-for-it.sh db-server:3306
cd /home/polemarch
sudo -u polemarch -H /opt/polemarch/bin/coverage run --source='/opt/polemarch/lib/python2.7/site-packages/polemarch' -m polemarch test -v 2 polemarch.main.tests
sudo -u polemarch -H /opt/polemarch/bin/coverage report -m
/bin/bash || exit 0
"
external_links:
- db-server
- cache-server:memcache-server
- locks-server:memcache-server