before_script:
  - composer install --prefer-dist --no-interaction > /dev/null
  - npm install gulp > /dev/null
  - npm install > /dev/null
  - gulp --production
  - cp .env.example .env
  - php artisan key:generate
  - /home/gitlabci/gitlabci_vukcore.sh
  - php artisan migrate
  
variables:
  MYSQL_DATABASE: vuk_core
  MYSQL_USER: vuk_core
  MYSQL_PASSWORD: FoBBiT7qLvWLa9XWkzsSwaIxqd0d1H

phpunit:php5.5:mysql5.5:
  image: php:5.5
  services:
    - mysql:5.5
  only:
    - development
    - production
  script:
    - php vendor/bin/phpunit --colors
    - vendor/bin/phpmd app/ text phpmd.xml
    - vendor/bin/phpcs --standard=psr2 app
before_script:
  - composer install --prefer-dist --no-interaction > /dev/null
  - npm install gulp > /dev/null
  - npm install > /dev/null
  - gulp --production
  - cp .env.example .env
  - php artisan key:generate
  - /home/gitlabci/gitlabci_vukcore.sh
  - php artisan migrate:reset
  - php artisan migrate
  - php artisan serve -q &
  
phpunit:php5.5:mysql5.5:
  image: php:5.5
  services:
    - mysql:5.5
  only:
    - development
    - production
  script:
    - php vendor/bin/phpunit --colors
    - vendor/bin/phpmd app/ text phpmd.xml
    - vendor/bin/phpcs --standard=psr2 app
    - php artisan migrate:reset
    - kill $(pidof php artisan serve)
Reset the database after the script finishes executing. Also use artisan serve for deploying homestead.
Reset the database after the script finishes executing.  Also use artisan serve for deploying homestead.