Skip to content

Commit

Permalink
Merge pull request #9 from ishanvyas22/releases/1.0.3
Browse files Browse the repository at this point in the history
Release version 1.0.3
  • Loading branch information
ishanvyas22 authored Oct 26, 2019
2 parents bf4125e + 500236e commit b60b9aa
Show file tree
Hide file tree
Showing 21 changed files with 9,912 additions and 1,460 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/logs/*
/tmp/*
/vendor/*
/config/Migrations/schema-dump-default.lock

# OS generated files #
######################
Expand Down
54 changes: 47 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,77 @@ sudo: false
branches:
only:
- master
- develop
- releases/1.0.3

php:
- 5.6
- 7.0
- 7.1
- 7.2

env:
matrix:
- DB=mysql DATABASE_URL='mysql://root:[email protected]/cakevue_spa?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"' DATABASE_TEST_URL='mysql://root:[email protected]/test_cakevue_spa?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'

services:
- mysql

addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client

matrix:
fast_finish: true

global:
- DEFAULT=1
- PHPCS=0
- PHPSTAN=0
- CODECOVERAGE=0

include:
- php: 7.1
- php: 7.2
env: PHPCS=1 DEFAULT=0

- php: 7.1
- php: 7.2
env: PHPSTAN=1 DEFAULT=0

- php: 7.2
env: CODECOVERAGE=1 DEFAULT=0 DB=mysql DATABASE_URL='mysql://root:[email protected]/cakevue_spa?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"' DATABASE_TEST_URL='mysql://root:[email protected]/test_cakevue_spa?init[]=SET sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'

before_install:
- sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('root') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- sudo mysql_upgrade -u root -proot
- sudo service mysql restart

before_script:
- if [ $DB = 'mysql' ]; then mysql -u root -proot -e 'CREATE DATABASE cakevue_spa;'; fi
- if [ $DB = 'mysql' ]; then mysql -u root -proot -e 'CREATE DATABASE test_cakevue_spa;'; fi
- if [[ $PHPCS = 1 ]]; then composer require cakephp/cakephp-codesniffer:^3.0; fi
- if [[ $DEFAULT = 1 ]]; then composer install; fi
- if [[ $DEFAULT = 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi
- if [[ $DEFAULT = 1 ]]; then composer install --no-interaction; fi
- if [[ $DEFAULT = 1 ]]; then composer test-setup; fi
- if [[ $DEFAULT = 1 ]]; then composer run-script post-install-cmd --no-interaction; fi
- if [[ $PHPSTAN = 1 ]]; then composer require --dev "phpstan/phpstan"; fi

- if [[ $CODECOVERAGE = 1 ]]; then composer install --no-interaction; fi
- if [[ $CODECOVERAGE = 1 ]]; then composer run-script post-install-cmd --no-interaction; fi
- if [[ $CODECOVERAGE = 1 ]]; then composer test-setup; fi

script:
- if [[ $DEFAULT = 1 ]]; then vendor/bin/phpunit; fi
- if [[ $DEFAULT = 1 ]]; then composer test; fi

- if [[ $PHPCS = 1 ]]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./webroot; fi
- if [[ $PHPSTAN = 1 ]]; then vendor/bin/phpstan analyse -l 5 src; fi

- if [[ $PHPSTAN = 1 ]]; then composer phpstan-setup && composer phpstan; fi

- if [[ $CODECOVERAGE == 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml; fi

after_success:
- if [[ $CODECOVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi

notifications:
email: false
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"php": ">=5.6",
"cakephp/cakephp": "3.6.*",
"cakephp/cakephp": "3.8.*",
"cakephp/migrations": "^2.0.0",
"cakephp/plugin-installer": "^1.0",
"josegonzalez/dotenv": "3.*",
Expand All @@ -15,7 +15,6 @@
"cakephp/bake": "^1.1",
"cakephp/cakephp-codesniffer": "^3.0",
"cakephp/debug_kit": "^3.15.0",
"phpstan/phpstan": "^0.11.5",
"psy/psysh": "@stable"
},
"autoload": {
Expand All @@ -35,11 +34,17 @@
"post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
"check": [
"@test",
"@cs-check"
"@cs-fix",
"@cs-check",
"@phpstan"
],
"cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
"cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/",
"test": "phpunit --colors=always"
"test-setup": "cp composer.json composer.backup && composer require --dev phpunit/phpunit:\"^5.7.14|^6.0\" && mv composer.backup composer.json",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --coverage-clover=clover.xml",
"phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan && mv composer.backup composer.json",
"phpstan": "phpstan analyse -l 5 src/"
},
"prefer-stable": true,
"config": {
Expand Down
Loading

0 comments on commit b60b9aa

Please sign in to comment.