Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
feat: Added locally test script
Browse files Browse the repository at this point in the history
  • Loading branch information
DouglasCorreiaMeli committed Oct 19, 2021
1 parent f59def5 commit 0756711
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync
# Install dependencies
RUN apt-get update -y
RUN apt-get install -y nano unzip
RUN install-php-extensions intl gd soap bcmath pdo_mysql xsl zip
RUN install-php-extensions intl gd soap pdo_mysql xsl zip

# Install and configure xdebug
RUN yes | pecl install xdebug \
Expand All @@ -31,5 +31,8 @@ RUN sh bin/install-mg2.sh
# Install plugin
COPY src magento2/app/code

# Config dir test folder
COPY phpunit.xml phpunit.xml

# Fix permissions
RUN chmod 777 -Rf magento2
5 changes: 5 additions & 0 deletions bin/run-all-linters.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
docker-compose up -d
#docker exec magento-php magento2/vendor/bin/phpcs -q --report=full --standard=Magento2 magento2/app/code/MercadoPago/
docker exec magento-php magento2/vendor/bin/phpstan analyse --error-format=table --level 0 magento2/app/code/MercadoPago/
#docker exec magento-php magento2/vendor/bin/phpmd magento2/app/code/MercadoPago/ --ignore-violations-on-exit text codesize,unusedcode,naming,cleancode
5 changes: 5 additions & 0 deletions bin/run-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
docker-compose up -d
docker exec magento-php mkdir reports/
docker exec magento-php magento2/vendor/phpunit/phpunit/phpunit --configuration phpunit.xml --coverage-clover clover.xml --coverage-text --coverage-html reports/ magento2/app/code/MercadoPago/Test
docker exec magento-php chmod 777 -Rf reports/
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<filter>
<whitelist>
<directory suffix=".php">magento2/app/code/MercadoPago/Core/Block</directory>
<directory suffix=".php">magento2/app/code/MercadoPago/Core</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit 0756711

Please sign in to comment.