-
Notifications
You must be signed in to change notification settings - Fork 71
/
.gitlab-ci.yml
88 lines (77 loc) · 2.79 KB
/
.gitlab-ci.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
82
83
84
85
86
87
image: troopers/docker-images:ci-victoire
variables:
GIT_SUBMODULE_STRATEGY: normal
DISPLAY: ':99.0'
stages:
- install
- tests
install:
stage: install
before_script:
- service mysql start
- service redis-server start
script:
- npm install [email protected]
- echo "memory_limit = 2048M" > /usr/local/etc/php/conf.d/memory.ini
- php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php && php composer-setup.php && rm composer-setup.php
- php composer.phar install --prefer-dist
- mkdir fails
- wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar -O vendor/selenium.jar
- cp Tests/App/app/config/parameters.yml.dist Tests/App/app/config/parameters.yml
- (cd Bundle/UIBundle/Resources/config/ && bower install --allow-root)
- php Tests/App/bin/console --env=ci assets:install Tests/App/web --no-debug
- php Tests/App/bin/console --env=ci bazinga:js-translation:dump --no-debug
- php Tests/App/bin/console --env=ci fos:js:dump --target="Tests/App/web/js/fos_js_routes_test.js" --no-debug
- php Tests/App/bin/console --env=domain fos:js:dump --target="Tests/App/web/js/fos_js_routes_domain.js" --no-debug
- php Tests/App/bin/console --env=ci assetic:dump --no-debug
tags:
- victoire
artifacts:
paths:
- fails
- vendor
- Tests/App/web
.behat: &behat
stage: tests
dependencies:
- install
before_script:
- service mysql start
- service redis-server start
- echo 127.0.0.1 fr.victoire.io >> /etc/hosts
- echo 127.0.0.1 en.victoire.io >> /etc/hosts
- Xvfb :99 -ac &>/dev/null &
- echo "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" | mysql
- echo "always_populate_raw_post_data=-1" > /usr/local/etc/php/conf.d/post_data.ini
- cp Tests/App/app/config/parameters.yml.dist Tests/App/app/config/parameters.yml
- php Tests/App/bin/console --env=ci doctrine:database:create --no-debug
- php Tests/App/bin/console --env=ci doctrine:schema:create --no-debug
- php Tests/App/bin/console --env=ci cache:warmup --no-debug
- php Tests/App/bin/console --env=domain cache:warmup --no-debug
- php Tests/App/bin/console --env=ci victoire:generate:view --no-debug
- java -jar vendor/selenium.jar &> /dev/null &
- nohup php Tests/App/bin/console --env=ci server:run 127.0.0.1:8000 -q -r Tests/App/app/config/router_ci.php -d ./Tests/App/web &
script:
- ci/src/parallel-behat vendor/bin/behat Tests/Features/
tags:
- victoire
artifacts:
paths:
- Tests/App/var/logs
- fails
- composer.lock
- web
expire_in: 24 hrs
when: on_failure
behat:1:
<<: *behat
behat:2:
<<: *behat
behat:3:
<<: *behat
behat:4:
<<: *behat
behat:5:
<<: *behat
behat:6:
<<: *behat