-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
59 lines (48 loc) · 1.46 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
variables:
COMPOSER_DISABLE_XDEBUG_WARN: "1"
cache:
paths:
- vendor/
before_script:
# Install mysql driver
- docker-php-ext-enable gd zip pdo_mysql xdebug intl
# Install composer
- curl -sS https://getcomposer.org/installer | php
# Install all project dependencies
- mv app/config/parameters.gitlab.yml app/config/parameters.yml.dist
- ping -c 3 mysql
- php -v
- composer install
- php bin/console doctrine:schema:create
- php bin/console doctrine:fixtures:load --no-interaction
# remove cache folders
- rm -r var/cache/
#configuring LexitJWTAuth
- rm -r var/jwt; mkdir var/jwt
- openssl genrsa -out var/jwt/private.pem -passout pass:pleaseChangeMe -aes256 4096
- openssl rsa -passin pass:pleaseChangeMe -pubout -in var/jwt/private.pem -out var/jwt/public.pem
services:
- mysql:latest
variables:
# Configure mysql service (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: symfony
MYSQL_ROOT_PASSWORD: password
test70:
stage: test
image: tetraweb/php:7.0
script:
- ./vendor/bin/phpunit --verbose --tap
pages:
stage: deploy
image: tetraweb/php:7.0
only:
- master
script:
- ./vendor/bin/phpmetrics --version
- ./vendor/bin/phpmetrics --report-html=build/phpmetrics/index.html src/
- ./vendor/bin/phpunit --coverage-html build/phpunit/ -d memory_limit=1G
# - ./vendor/bin/phpunit --coverage-text -d memory_limit=1G
- cp -r build/ public/
artifacts:
paths:
- public