Skip to content

Commit

Permalink
Merge branch 'master' into astorm#476-Crud_Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sallaberry authored Aug 10, 2019
2 parents 92f0e61 + 3a6a8b0 commit 2a6c573
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 5 deletions.
22 changes: 20 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ language: php
sudo: required
dist: trusty
php:
- 5.6
- 7.0
- 7.1
before_script:
# some useful debugging stuff for travis
#- curl http://magento-2-travis.dev/index.php
Expand Down Expand Up @@ -91,6 +90,21 @@ before_script:
# test that magento is installed
- curl "$PULSESTORM_MAGE2_FAKE_URL/index.php"
- pestle.phar hello_world
# phpcs install and generating a module for same

# generate the code for phpcs
- ../travis/for-lint.sh

# leave m2 folder
- cd ..

# install phpcs
- mkdir phpcs/
- cd phpcs/
- echo "{}" > composer.json
- composer require magento/magento-coding-standard -vvv

# return to the base folder and composer install pestle
- cd ..
- composer install
script:
Expand All @@ -99,3 +113,7 @@ script:
# integration tests
- cd magento2
- vendor/bin/phpunit vendor/pulsestorm/pestle/tests-integration
# run phpcs
- cd ../phpcs
- find ../magento2/app/code/Pulsestorm
- vendor/bin/phpcs vendor/bin/phpcs --standard=vendor/magento/magento-coding-standard/Magento2/ ../magento2/app/code/Pulsestorm/Travis
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"require-dev": {
"phpunit/phpunit": "4.8.*",
"phing/phing": "2.*",
"phpspec/prophecy":"1.7.0"
"phpspec/prophecy":"1.7.0",
"magento/magento-coding-standard": "^4.0"
},
"autoload": {
"files": ["library/autoload.php"]
Expand Down
86 changes: 84 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions travis/for-lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

## Our travis CI/CD will run this script from the root of a Magento
## folder. Put pestle commands here to generate code in the
## Pulsestorm_Travis module. At the end of the CI we'll run phpcs
## against this folder to ensure generate code


## putting some basic files in place so we can merge and tackle
## the "phpcs-ification" of things in stages
mkdir -p app/code/Pulsestorm/Travis
printf "<?php\nnamespace Pulsestorm\\Travis;\n\nclass Foo\n{\n}\n" > app/code/Pulsestorm/Travis/Test.php

# pestle.phar magento2:generate:crud-model Pulsestorm_Travis Thing

0 comments on commit 2a6c573

Please sign in to comment.