Skip to content

Instantly share code, notes, and snippets.

@kevinvdburgt
Last active April 6, 2018 16:00
Show Gist options
  • Save kevinvdburgt/1dcc69d1078884bcb28d to your computer and use it in GitHub Desktop.
Save kevinvdburgt/1dcc69d1078884bcb28d to your computer and use it in GitHub Desktop.
Laravel 5.1 - GitLab CI (**OUTDATED**)
#!/bin/bash
# Moved to: https://github.com/kevinvdburgt/Laravel-GitLab-CI
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
. ~/.nvm/nvm.sh
nvm install 0.12
nvm alias default 0.12
npm config set cache-min 86400
npm config set cache /cache/node_modules/
npm install -g gulp
npm install
# Moved to: https://github.com/kevinvdburgt/Laravel-GitLab-CI
image: tetraweb/php:5.6-cli
services:
- mysql
variables:
WITH_XDEBUG: "1"
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
COMPOSER_HOME: /cache/composer
stages:
- linter
- test
php-5.5:
type: test
image: tetraweb/php:5.5-cli
script:
- docker-php-ext-enable zip
- docker-php-ext-enable mbstring
- docker-php-ext-enable pdo_mysql
- php -v
- composer self-update
- composer install --no-progress --no-interaction
- cp .env.example .env
- sed -i.bak 's/DB_HOST=localhost/DB_HOST=mysql/g' .env
- php artisan key:generate
- php artisan migrate:refresh
- php artisan db:seed
- source .ci-installer.sh
- gulp
- php vendor/bin/phpunit --colors --coverage-text
php-5.6:
type: test
image: tetraweb/php:5.6-cli
script:
- docker-php-ext-enable zip
- docker-php-ext-enable mbstring
- docker-php-ext-enable pdo_mysql
- php -v
- composer self-update
- composer install --no-progress --no-interaction
- cp .env.example .env
- sed -i.bak 's/DB_HOST=localhost/DB_HOST=mysql/g' .env
- php artisan key:generate
- php artisan migrate:refresh
- php artisan db:seed
- source .ci-installer.sh
- gulp
- php vendor/bin/phpunit --colors --coverage-text
php-7.0:
type: test
image: tetraweb/php:7.0-cli
script:
- docker-php-ext-enable zip
- docker-php-ext-enable mbstring
- docker-php-ext-enable pdo_mysql
- php -v
- composer self-update
- composer install --no-progress --no-interaction
- cp .env.example .env
- sed -i.bak 's/DB_HOST=localhost/DB_HOST=mysql/g' .env
- php artisan key:generate
- php artisan migrate:refresh
- php artisan db:seed
- source .ci-installer.sh
- gulp
- php vendor/bin/phpunit --colors --coverage-text
allow_failure: true
phpcs:
type: linter
image: tetraweb/php:5.6-cli
script:
- php -v
- phpcs --version
- phpcs -p --standard=PSR2 --ignore="app/helpers.php,app/Http/routes.php" app/
eslint-node-4.2.1:
type: linter
image: node:4.2.1
script:
- source .ci-installer.sh
- npm install -g eslint eslint-config-airbnb eslint-loader eslint-plugin-react babel-eslint > /dev/null
- eslint resources/assets/js/
@kevinvdburgt
Copy link
Author

@abcdmitry, thanks for your input! I have moved those CI files to a git repository (See: https://github.com/kevinvdburgt/Laravel-GitLab-CI)

@kevinvdburgt
Copy link
Author

@andrefigueira i have moved (and upgraded) the CI scripts, see: https://github.com/kevinvdburgt/Laravel-GitLab-CI

@leon0399
Copy link

leon0399 commented May 7, 2017

@kevinvdburgt, Now this repo is deleted 😢

@kevinvdburgt
Copy link
Author

@leon0399 First, sorry for the delayed answer. I've removed the repo because is was realy outdated and stopped using GitLab back then. Went back to a paid version of GitHub and using it with CircleCI now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment