-
Notifications
You must be signed in to change notification settings - Fork 6
/
circle.yml
43 lines (36 loc) · 1.08 KB
/
circle.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
37
38
39
40
41
42
43
machine:
pre:
- echo 'DOCKER_OPTS="-s btrfs -e lxc -D --userland-proxy=false"' | sudo tee -a /etc/default/docker
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
- sudo chmod 0755 /usr/bin/docker
services:
- docker
dependencies:
pre:
- sudo pip install docker-compose==1.8.0
database:
override:
- docker-compose build percona
- docker-compose up -d percona
compile:
override:
- docker-compose up -d --build web
- docker images
test:
pre:
- |
docker-compose -f docker-compose.yml \
run phpfpm /bin/sh -c "chmod u+x /src/setup-mage.sh && /src/setup-mage.sh" | tee SetupTest
if grep -q "fail" SetupTest
then
echo "Setup Test Failed:"
cat ./SetupTest | grep fail | awk '{print $2, $3}'
exit 1
else
echo "Setup Test passed"
exit 0
fi
- docker-compose -f docker-compose.yml run phpfpm /bin/sh -c "apk add --no-cache mysql-client"
- docker ps
override:
- ./scripts/unit-test.sh