Commit 723813c3 authored by abkrim's avatar abkrim 😀
Browse files

First test database

parent 505d8769
Pipeline #191 failed with stages
in 46 seconds
stages:
- preparation
- building
- testing
- security
variables:
# MYSQL_ROOT_PASSWORD: root
# MYSQL_USER: dbschema_user
# MYSQL_PASSWORD: dbschema_secret
# MYSQL_DATABASE: dbschema_ci
# DB_HOST: mysql
cache:
key: $CI_BUILD_REF_NAME
composer:
stage: preparation
# services:
# - {name: 'abkrim/mysql8_legacy_password', alias: 'mysql'}
image: edbizarro/gitlab-ci-pipeline-php:7.3-alpine
script:
- php -v
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
# - cp .env.example .env
- php artisan key:generate
artifacts:
paths:
- vendor/
- .env
expire_in: 5 days
when: always
cache:
paths:
- vendor/
# NOt at this momment
#db-seeding:
# stage: building
# services:
# - {name: 'abkrim/mysql8_legacy_password', alias: 'mysql'}
# image: edbizarro/gitlab-ci-pipeline-php:7.3-alpine
# dependencies:
# - composer
# script:
# - php artisan migrate:fresh --seed
# artifacts:
# paths:
# - ./storage/logs # for debugging
# expire_in: 1 days
# when: on_failure
phpunit:
stage: testing
# services:
# - {name: 'abkrim/mysql8_legacy_password', alias: 'mysql'}
image: edbizarro/gitlab-ci-pipeline-php:7.3-alpine
dependencies:
# - build-assets
- composer
# - db-seeding
script:
- php -v
- sudo cp /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.bak
- echo "" | sudo tee /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./vendor/phpunit/phpunit/phpunit --version
- php -d short_open_tag=off ./vendor/phpunit/phpunit/phpunit -v --colors=never --stderr
- sudo cp /usr/local/etc/php/conf.d/docker-php-ext-xdebug.bak /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
artifacts:
paths:
- ./storage/logs # for debugging
expire_in: 1 days
when: on_failure
codestyle:
stage: testing
image: lorisleiva/laravel-docker:latest
script:
- phpcs --standard=PSR2 --extensions=php app
dependencies: []
phpcpd:
stage: testing
image: edbizarro/gitlab-ci-pipeline-php:7.3
script:
- test -f phpcpd.phar || curl -L https://phar.phpunit.de/phpcpd.phar -o phpcpd.phar
- php phpcpd.phar app/ --min-lines=50
dependencies: []
cache:
paths:
- phpcpd.phar
sensiolabs:
stage: security
image: edbizarro/gitlab-ci-pipeline-php:7.3
script:
- test -d security-checker || git clone https://github.com/sensiolabs/security-checker.git
- cd security-checker
- composer install
- php security-checker security:check ../composer.lock
dependencies: []
cache:
paths:
- security-checker/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment