![]() ![]() Image: docker.io/wardenenv/elasticsearch:7.8 Options: -tmpfs /tmp:rw -tmpfs /var/lib/mysql:rw -health-cmd="mysqladmin ping" -health-interval=10s -health-timeout=5s -health-retries=3 github/workflows/integration.yml name: ExtDN M2 Integration Tests This Github Action provides a blueprint on how to get your existing tests run as a Github action. Integration tests are a great way to test that your code works well within a given Magento installation. uses: uses: Magento 2 Integration Tests github/workflows/mess-detector.yml with this content: name: ExtDN M2 Mess Detector This action extracts the Magento 2 mess detector ruleset into its own action. uses: uses: foo/magento2-foobar Magento 2 Mess Detector github/workflows/phpstan.yml with the following content: name: ExtDN M2 PhpStan This Github action extracts this check to be run standalone against your code. Issues that show up in PHPStan include calling inexistent classes, methods, wrong parameter counts, etc.Īdobe has recently introduced PHPStan to the Magento core code checks. This allows PHPStan to catch a wide range of issues without the need to write explicit tests for it. PHPStan is a static code analysis tool that understands more of your code than the Php_CodeSniffer that the Magento 2 Coding Standard above is based on, thanks in large parts being Php 7+ and having access to the underlying code syntax tree. uses: uses: this is pushed to Github you are all set and any new code pushes and pull request will run through Magento’s coding standard check. github/workflows/coding-standard.yml then copy the following content name: ExtDN M2 Coding Standard This Github action allows you to test your own code against this standard in an automated fashion.Ĭreate a new file. Standard contained in the Magento 2 code baseįortunately all of the above have now been replaced by the unified Magento 2 Coding Standard with the core code also adhering to it.PSR-2 (Magento is part of PHP-FIG after all).Magento 2 Coding Standardīack in the early days there were many differing standards in circulation in the Magento ecosystem: While there is more to a great extension using these actions we believe provide a good baseline.Īll you need is a repo and then copy and paste our pre-setup Github Actions. We are happy to announce that to support this mission we have started releasing some open source tools that can be easily embedded in any Magento 2 extension development process using Github Actions. One of the ways ExtDN is trying to advance the Magento ecosystem is through promoting good practice in extension coding standards.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |