forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
55 lines (52 loc) · 2.06 KB
/
wercker.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
box: hhvm/hhvm-proxygen:3.18-lts-latest
# Build definition
build:
# The steps that will be executed on build
steps:
- script:
name: disable interactive install
code: |
export DEBIAN_FRONTEND=noninteractive
- install-packages:
packages: curl git mysql-server redis-server postgresql
- script:
name: start database servers
code: |
/etc/init.d/mysql start
/etc/init.d/redis-server start
sed -i "s/ peer/ trust/g" /etc/postgresql/*/main/pg_hba.conf
sed -i "s/ md5/ trust/g" /etc/postgresql/*/main/pg_hba.conf
/etc/init.d/postgresql start
- script:
name: install composer
code: |
rm -f composer.lock
export COMPOSER_CACHE_DIR=$WERCKER_CACHE_DIR
curl -sS https://getcomposer.org/installer | hhvm --php -- --install-dir=/usr/local/bin/
composer.phar remove mongodb/mongodb --no-update --dev
composer.phar install
echo "xdebug.enable = On" >> /etc/hhvm/php.ini
- script:
name: setup HHVM servers
code: |
echo ${WERCKER_ROOT}/tests/data/app
echo "hhvm.server.source_root=${WERCKER_ROOT}/tests/data/app" >> tests/data/app/hhvm-server.ini
cat tests/data/app/hhvm-server.ini
hhvm -m server -c tests/data/app/hhvm-server.ini -c /etc/hhvm/site.ini &
echo "hhvm.server.source_root=${WERCKER_ROOT}/tests/data/rest" >> tests/data/rest/hhvm-server.ini
hhvm -m server -c tests/data/rest/hhvm-server.ini -c /etc/hhvm/site.ini &
- script:
name: prepare databases
code: |
mysql -e 'create database codeception_test;'
su postgres -c "psql -c 'create database codeception_test;' -U postgres"
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: codeception CLI tests
code: |
php codecept run cli RunCest
- script:
name: codeception unit tests
code: |
php codecept run unit