mirror of
https://github.com/elyby/accounts.git
synced 2024-12-26 07:09:46 +05:30
Fix gitlab-ci
This commit is contained in:
parent
49d612daa1
commit
40eea7864e
@ -9,26 +9,45 @@ variables:
|
|||||||
check backend codestyle:
|
check backend codestyle:
|
||||||
image: edbizarro/gitlab-ci-pipeline-php:7.2-alpine
|
image: edbizarro/gitlab-ci-pipeline-php:7.2-alpine
|
||||||
stage: test
|
stage: test
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- vendor
|
||||||
script:
|
script:
|
||||||
|
- composer install
|
||||||
- vendor/bin/php-cs-fixer fix -v --dry-run
|
- vendor/bin/php-cs-fixer fix -v --dry-run
|
||||||
|
|
||||||
test backend:
|
test backend:
|
||||||
image: edbizarro/gitlab-ci-pipeline-php:7.2-alpine
|
image: edbizarro/gitlab-ci-pipeline-php:7.2-alpine
|
||||||
services:
|
services:
|
||||||
- mariadb:10.2.11
|
- name: redis:4.0.10-alpine
|
||||||
- redis:3.0-alpine
|
alias: redis
|
||||||
|
- name: mariadb:10.2.11
|
||||||
|
alias: db
|
||||||
variables:
|
variables:
|
||||||
# app config
|
# App config
|
||||||
YII_ENV: "test"
|
DB_HOST: "db"
|
||||||
YII_DEBUG: "true"
|
DB_DATABASE: "ely_accounts_test"
|
||||||
# mariadb config
|
DB_USER: "ely_accounts_tester"
|
||||||
|
DB_PASSWORD: "ely_accounts_tester_password"
|
||||||
|
REDIS_HOST: "redis"
|
||||||
|
REDIS_PORT: "6379"
|
||||||
|
# MariaDB config
|
||||||
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
MYSQL_RANDOM_ROOT_PASSWORD: "true"
|
||||||
MYSQL_DATABASE: "ely_accounts_test"
|
MYSQL_DATABASE: "ely_accounts_test"
|
||||||
MYSQL_USER: "ely_accounts_tester"
|
MYSQL_USER: "ely_accounts_tester"
|
||||||
MYSQL_PASSWORD: "ely_accounts_tester_password"
|
MYSQL_PASSWORD: "ely_accounts_tester_password"
|
||||||
stage: test
|
stage: test
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- vendor
|
||||||
|
before_script:
|
||||||
|
# While we not counting coverage, xdebug only slow down tests
|
||||||
|
- sudo rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
||||||
script:
|
script:
|
||||||
- docker-entrypoint.sh vendor/bin/codecept run -c tests
|
- composer install
|
||||||
|
- php tests/codeception/bin/yii rbac/generate
|
||||||
|
- ./docker/php/wait-for-it.sh "${DB_HOST}:3306" -s -t 0 -- "php tests/codeception/bin/yii migrate/up --interactive=0"
|
||||||
|
- vendor/bin/codecept run -c tests
|
||||||
|
|
||||||
test frontend:
|
test frontend:
|
||||||
image: node:9.2.1-alpine
|
image: node:9.2.1-alpine
|
||||||
@ -71,7 +90,7 @@ build:production:
|
|||||||
- sed -i"" -e "s/{{PLACE_VERSION_HERE}}/$VERSION/g" common/config/config.php
|
- sed -i"" -e "s/{{PLACE_VERSION_HERE}}/$VERSION/g" common/config/config.php
|
||||||
script:
|
script:
|
||||||
- export IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
- export IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
||||||
- docker build --pull -t $IMAGE_NAME .
|
- docker build --pull --build-arg build_env=prod -t $IMAGE_NAME .
|
||||||
only:
|
only:
|
||||||
- develop
|
- develop
|
||||||
- tags
|
- tags
|
||||||
|
Loading…
Reference in New Issue
Block a user