Skip to content

Instantly share code, notes, and snippets.

@rufhausen
Last active December 28, 2017 17:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rufhausen/e653f321ae8fc84b5890e7f8967cb3c8 to your computer and use it in GitHub Desktop.
Save rufhausen/e653f321ae8fc84b5890e7f8967cb3c8 to your computer and use it in GitHub Desktop.
Laravel 5.3 PHPCI config
build_settings:
verbose: false
prefer_symlink: false
ignore:
- "vendor"
# mysql:
# host: "localhost"
# user: "root"
# pass: ""
setup:
# mysql:
# - "DROP DATABASE IF EXISTS bands_test;"
# - "CREATE DATABASE bands_test;"
# - "GRANT ALL PRIVILEGES ON test.* TO test@'localhost' IDENTIFIED BY 'test';"
composer:
action: "install"
prefer_dist: false
shell:
- "cd %BUILD_PATH% && cp .env.ci .env"
- "echo copied .env file"
- "cd %BUILD_PATH% && chmod 777 -R storage" #may not be necessary
- "echo storage permissions updated"
- "php artisan key:generate"
# - "cd %BUILD_PATH% && php artisan migrate --seed" #I'm currently using sqlite for testing currently and
# migrate/seeding in tests setup and teardown
env:
APP_ENV: "testing"
DB_CONNECTION: "testing"
test:
php_parallel_lint:
ignore:
- vendor/
- _ide_helper.php
php_code_sniffer:
#standard: "/phpcs.xml"
#allowed_errors: 0
#allowed_warnings: -1 #unlimited
path: "app"
ignore:
- "app/views"
standard: "PSR1,PSR2"
php_mess_detector:
path: "app"
ignore:
- 'vendor'
rules:
# - "cleancode" #throws a bunch of errors when using facades because of static method calls rule.
- "controversial"
- "codesize"
- "design"
- "naming"
- "unusedcode"
allow_failures: true
zero_config: true # do not make build as failed if something was detected
php_unit:
config:
- "phpunit.xml"
path: "tests/"
complete:
# mysql:
# - "DROP DATABASE IF EXISTS bands_test;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment