Created
May 14, 2019 07:05
-
-
Save Asetss/5f103ea06458b4d8b800001d5de9201a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- test | |
# Variables: these have to match | |
# the .env.example credentials in your Laravel app | |
# use the default homestead/secret combination, since | |
# that database gets created in the edbizarro/gitlab-ci-pipeline-php:7.1 | |
# docker image. | |
variables: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: homestead | |
MYSQL_PASSWORD: secret | |
MYSQL_DATABASE: homestead | |
DB_HOST: mysql | |
# Speed up builds | |
cache: | |
key: $CI_COMMIT_REF_NAME # changed to $CI_COMMIT_REF_NAME in Gitlab 9.x | |
paths: | |
- vendor | |
- node_modules | |
- public | |
- .yarn | |
test: | |
stage: test | |
services: | |
- mysql:5.7 | |
image: registry.gitlab.com/aknosis/laravel-ci-example:latest | |
script: | |
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts | |
- cp .env.example .env | |
- php artisan command:ReloadCI | |
- php artisan key:generate | |
- php artisan jwt:secret | |
- php artisan serve & | |
- ./vendor/phpunit/phpunit/phpunit -v --colors=never | |
artifacts: | |
paths: | |
- ./storage/logs # for debugging | |
expire_in: 1 days | |
when: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment