forked from million12/M12.Foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
81 lines (75 loc) · 2.88 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
machine:
services:
- docker
hosts:
neos: 127.0.0.1
dev.neos: 127.0.0.1
dependencies:
pre:
- docker info && docker version
override:
- docker pull million12/mariadb
- docker pull million12/behat-selenium
- docker pull million12/neos-typostrap-distribution
post:
# Launch DB backend
- docker run -d --name=db --env="MARIADB_PASS=my-pass" million12/mariadb
- docker logs -f db | tee -a ${CIRCLE_ARTIFACTS}/docker-db.log:
background: true
# Run tests
test:
override:
# ######################################################
# Run Typostrap Neos container, which includes
# M12.Foundation / M12.FoundationSite packages
# and do some basics checks.
# ######################################################
- |
docker run -d \
--name=neos -p=8080:80 \
--link=db:db \
--env="T3APP_NAME=neos" \
--env="T3APP_VHOST_NAMES=neos dev.neos behat.dev.neos" \
--env="T3APP_DO_INIT_TESTS=true" \
--env="T3APP_ALWAYS_DO_PULL=true" \
million12/neos-typostrap-distribution " \
su www -c \"
cd ~/neos; \
composer update m12/*; \
cd Packages/Plugins/M12.Foundation; \
git fetch && git checkout --force $CIRCLE_BRANCH; \
cd ~/neos; \
./flow flow:cache:flush --force; \
./flow cache:warmup
\"
"
- docker logs -f neos > ${CIRCLE_ARTIFACTS}/docker-neos.log 2>&1:
background: true
# Wait till TYPO3 Neos is fully configured
- while true; do if grep "nginx entered RUNNING state" ${CIRCLE_ARTIFACTS}/docker-neos.log; then break; else sleep 1; fi done
# Test: do basic front-end tests
- curl -L --head http://neos:8080 && curl -s -L http://neos:8080
- curl -s --head http://neos:8080 | grep "HTTP/1.1 200 OK" && curl -s --head http://neos:8080 | grep "X-Flow-Powered"
- curl -s -L http://neos:8080/neos | grep "TYPO3 Neos Login"
# Run unit tests:
- |
docker run -ti --volumes-from=neos --link=neos:web --link=db:db million12/behat-selenium "
env && \
echo \$WEB_PORT_80_TCP_ADDR \$WEB_ENV_T3APP_VHOST_NAMES >> /etc/hosts && cat /etc/hosts && \
su www -c \"
cd ~/neos && \
echo -e '\n\n======== RUNNING UNIT TESTS =======\n\n' && \
bin/phpunit -c Build/BuildEssentials/PhpUnit/UnitTests.xml --colors
\"
"
# Run functional tests:
- |
docker run -ti --volumes-from=neos --link=neos:web --link=db:db million12/behat-selenium "
env && \
echo \$WEB_PORT_80_TCP_ADDR \$WEB_ENV_T3APP_VHOST_NAMES >> /etc/hosts && cat /etc/hosts && \
su www -c \"
cd ~/neos && \
echo -e '\n\n======== RUNNING FUNCTIONAL TESTS =======\n\n' && \
bin/phpunit -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml --colors
\"
" || true