forked from felipemacahdo/open-loyalty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
38 lines (36 loc) · 1.59 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
stages:
- test
variables:
POSTGRES_DB: "openloyalty"
POSTGRES_USER: "openloyalty"
POSTGRES_PASSWORD: "openloyalty"
php-7.1:
image: tetraweb/php:7.1
stage: test
services:
- elasticsearch:2.2
- postgres:9
script:
- echo "memory_limit = 512M" > /usr/local/etc/php/conf.d/memory.ini
- cd backend
- mkdir app/var
- mkdir app/var/jwt
- openssl genrsa -out app/var/jwt/private.pem 4096
- openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem
- docker-php-ext-enable zip pdo pgsql pdo_pgsql mbstring intl bcmath
- "sed -i 's/database_host: .*/database_host: postgres/g' app/config/parameters.yml.dist"
- "sed -i 's/elastica_host: .*/elastica_host: elasticsearch/g' app/config/parameters.yml.dist"
- composer self-update
- composer install
- bin/console oloy:user:projections:index:create --drop-old
- bin/console doctrine:schema:update --env=test -n --force
- bin/console broadway:event-store:schema:drop
- bin/console broadway:event-store:schema:init
- bin/console broadway:snapshoting:schema:drop -n
- bin/console broadway:snapshoting:schema:init -n
- bin/console doctrine:fixtures:load --env=test -n
- bin/console assets:install --env=test
- bin/console doctrine:schema:validate --env=test --skip-sync
#- bin/console security:check
- export SYMFONY_DEPRECATIONS_HELPER=disabled; vendor/phpunit/phpunit/phpunit
- bin/php-cs-fixer fix --verbose --show-progress=estimating --dry-run --diff --rules=@Symfony,-yoda_style,-single_blank_line_before_namespace,compact_nullable_typehint src