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

Release 3.12.1 #177

Merged
merged 158 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
05b65ca
add actions for phpcs
DouglasCorreiaMeli Sep 15, 2021
5612d4f
add actions for phpcs in base workflow
DouglasCorreiaMeli Sep 15, 2021
d0a095b
fix phpcs for magento
DouglasCorreiaMeli Sep 15, 2021
5cf1b5d
improve phpcs in coverage checker
DouglasCorreiaMeli Sep 15, 2021
4098b06
improve phpcs in wallet/success
DouglasCorreiaMeli Sep 15, 2021
9e9ad3b
improve phpcs in wallet/success
DouglasCorreiaMeli Sep 15, 2021
1504838
improve phpcs in wallet/success
DouglasCorreiaMeli Sep 15, 2021
5592576
improve phpcs in wallet/*
DouglasCorreiaMeli Sep 15, 2021
b03fe77
test phbcbf
DouglasCorreiaMeli Sep 15, 2021
4265ebc
test phbcbf
DouglasCorreiaMeli Sep 15, 2021
7ff9bcd
test phbcbf
DouglasCorreiaMeli Sep 15, 2021
62d40ae
remove phpbcf
DouglasCorreiaMeli Sep 17, 2021
cc9361c
add improvements for phpcs
DouglasCorreiaMeli Sep 17, 2021
1305ddd
improve phpcs
DouglasCorreiaMeli Sep 17, 2021
3d0956b
executing phpcbf
gubrito Sep 27, 2021
2d621d7
removing old file
gubrito Sep 27, 2021
bb7a978
Merge branch 'feature/phpcs' of github.com:PluginAndPartners/cart-mag…
DouglasCorreiaMeli Sep 29, 2021
1274955
Merge pull request #167 from PluginAndPartners/master
katelucena-meli Oct 5, 2021
6146ac3
Merge branch 'develop' of github.com:PluginAndPartners/cart-magento2 …
DouglasCorreiaMeli Oct 6, 2021
20a2cd5
Update main.yaml
DouglasCorreiaMeli Oct 6, 2021
a38713d
split action in test and sniffer
DouglasCorreiaMeli Oct 7, 2021
d891a3c
CI: Setup CI PHPCS workflow
DouglasCorreiaMeli Oct 7, 2021
b11e069
Merge pull request #169 from PluginAndPartners/feature/phpcs
lira Oct 7, 2021
1ec7afc
ci: :zap: Add PHPMD in setup CI
DouglasCorreiaMeli Oct 8, 2021
d65a250
Merge pull request #171 from PluginAndPartners/feature/PPWP-360/PHPMD-CI
DouglasCorreiaMeli Oct 11, 2021
f4824bd
Added PHPStan on CI (#168)
GiovanniCavallari Oct 13, 2021
6541887
Init pr coverage
GiovanniCavallari Oct 13, 2021
c63aa5e
WIP pr coverage
GiovanniCavallari Oct 13, 2021
3d569a5
Rename actions files name
GiovanniCavallari Oct 13, 2021
724ba3e
WIP pr coverage
GiovanniCavallari Oct 13, 2021
d54ff40
Added php-code-coverage-verifier
GiovanniCavallari Oct 13, 2021
216546b
WIP pr coverage
GiovanniCavallari Oct 13, 2021
8646577
WIP pr coverage
GiovanniCavallari Oct 13, 2021
040d520
WIP pr coverage
GiovanniCavallari Oct 13, 2021
78bcd3f
WIP pr coverage
GiovanniCavallari Oct 13, 2021
060827e
WIP pr coverage
GiovanniCavallari Oct 13, 2021
7858668
WIP pr coverage
GiovanniCavallari Oct 13, 2021
47d3c09
feat: :rocket: add warning for terms and conditions in ticket payment
DouglasCorreiaMeli Oct 14, 2021
54ec95d
WIP pr coverage
GiovanniCavallari Oct 14, 2021
42d6a12
WIP pr coverage
GiovanniCavallari Oct 14, 2021
603581d
WIP pr coverage
GiovanniCavallari Oct 14, 2021
46411eb
WIP pr coverage
GiovanniCavallari Oct 14, 2021
556c5ac
WIP pr coverage
GiovanniCavallari Oct 14, 2021
5b9859a
WIP pr coverage
GiovanniCavallari Oct 14, 2021
72d9cd8
WIP pr coverage
GiovanniCavallari Oct 14, 2021
71f67b7
WIP pr coverage
GiovanniCavallari Oct 14, 2021
70e6c7d
WIP pr coverage
GiovanniCavallari Oct 14, 2021
4f79ffc
WIP pr coverage
GiovanniCavallari Oct 14, 2021
800379a
WIP pr coverage
GiovanniCavallari Oct 14, 2021
18a9c3c
WIP pr coverage
GiovanniCavallari Oct 14, 2021
9b4836a
WIP pr coverage
GiovanniCavallari Oct 14, 2021
ea999ca
WIP pr coverage
GiovanniCavallari Oct 14, 2021
20a478a
WIP pr coverage
GiovanniCavallari Oct 14, 2021
d996ad1
WIP pr coverage
GiovanniCavallari Oct 14, 2021
87ffb2a
WIP pr coverage
GiovanniCavallari Oct 14, 2021
cf488d1
WIP pr coverage
GiovanniCavallari Oct 14, 2021
fa22293
WIP pr coverage
GiovanniCavallari Oct 14, 2021
07ddcf0
WIP pr coverage
GiovanniCavallari Oct 14, 2021
bcf7ffd
WIP pr coverage
GiovanniCavallari Oct 14, 2021
080f163
WIP pr coverage
GiovanniCavallari Oct 14, 2021
f89f837
WIP pr coverage
GiovanniCavallari Oct 14, 2021
947f81f
WIP pr coverage
GiovanniCavallari Oct 14, 2021
007208d
WIP pr coverage
GiovanniCavallari Oct 14, 2021
f82a629
WIP pr coverage
GiovanniCavallari Oct 14, 2021
8d6db00
WIP pr coverage
GiovanniCavallari Oct 14, 2021
c10d2af
feat: add pt-br translation
DouglasCorreiaMeli Oct 14, 2021
86d9413
WIP pr coverage
GiovanniCavallari Oct 14, 2021
16583f9
WIP pr coverage
GiovanniCavallari Oct 14, 2021
2e788e7
WIP pr coverage
GiovanniCavallari Oct 14, 2021
09063d7
WIP pr coverage
GiovanniCavallari Oct 14, 2021
93cafc3
WIP pr coverage
GiovanniCavallari Oct 14, 2021
32667f4
WIP pr coverage
GiovanniCavallari Oct 14, 2021
900fc2d
WIP pr coverage
GiovanniCavallari Oct 14, 2021
b11bf87
WIP pr coverage
GiovanniCavallari Oct 14, 2021
e4524ef
WIP pr coverage
GiovanniCavallari Oct 14, 2021
e4efe5f
WIP pr coverage
GiovanniCavallari Oct 14, 2021
55ccff1
WIP pr coverage
GiovanniCavallari Oct 14, 2021
ead2d44
WIP pr coverage
GiovanniCavallari Oct 14, 2021
95e2ece
WIP pr coverage
GiovanniCavallari Oct 14, 2021
c3a9d7d
feat: :globe_with_meridians: add spanish translations
DouglasCorreiaMeli Oct 14, 2021
f775e51
Dynamic Finger Print Link on Ticket Page
maicongouveia Oct 15, 2021
c10e212
Dynamic Finger Print Link on Pix Page
maicongouveia Oct 15, 2021
d816142
feat: fix data bind attr
DouglasCorreiaMeli Oct 15, 2021
050fdf8
Merge pull request #173 from PluginAndPartners/feature/PPWP-375/devic…
DouglasCorreiaMeli Oct 15, 2021
126853c
Merge branch 'develop' into feature/PPWP-374/device-fingerprint-pix
Oct 15, 2021
fe665ba
Remove pr-coverage lib
GiovanniCavallari Oct 18, 2021
15f5939
Remove pr-coverage lib
GiovanniCavallari Oct 18, 2021
6f89d90
WIP pr coverage
GiovanniCavallari Oct 18, 2021
e088f5b
Merge branch 'develop' of github.com:PluginAndPartners/cart-magento2 …
GiovanniCavallari Oct 18, 2021
45bbae6
feat: add fingerprint in cho pro
DouglasCorreiaMeli Oct 18, 2021
908db95
WIP pr coverage
GiovanniCavallari Oct 18, 2021
1dc6415
WIP pr coverage
GiovanniCavallari Oct 18, 2021
9e5f872
WIP pr coverage
GiovanniCavallari Oct 18, 2021
0ecac30
WIP pr coverage
GiovanniCavallari Oct 18, 2021
7816ff5
WIP pr coverage
GiovanniCavallari Oct 18, 2021
75f1953
Merge pull request #175 from PluginAndPartners/feature/PPWP-373
gubrito Oct 18, 2021
d18b5a6
WIP pr coverage
GiovanniCavallari Oct 18, 2021
f3c8fdf
WIP pr coverage
GiovanniCavallari Oct 18, 2021
08cd099
Merge branch 'develop' of github.com:PluginAndPartners/cart-magento2 …
GiovanniCavallari Oct 18, 2021
398c878
WIP pr coverage
GiovanniCavallari Oct 18, 2021
16b57ac
WIP pr coverage
GiovanniCavallari Oct 18, 2021
94a6104
WIP pr coverage
GiovanniCavallari Oct 18, 2021
0f1d718
WIP pr coverage
GiovanniCavallari Oct 18, 2021
5ab06de
WIP pr coverage
GiovanniCavallari Oct 18, 2021
2ad1226
WIP pr coverage
GiovanniCavallari Oct 18, 2021
a0ea162
WIP pr coverage
GiovanniCavallari Oct 18, 2021
97ff833
WIP pr coverage
GiovanniCavallari Oct 18, 2021
683f38c
WIP pr coverage
GiovanniCavallari Oct 18, 2021
c4523c5
Bug to run pipeline
GiovanniCavallari Oct 18, 2021
472fa31
Bug to run pipeline
GiovanniCavallari Oct 18, 2021
28a5db7
Bug to run pipeline
GiovanniCavallari Oct 18, 2021
62e26aa
WIP pr coverage
GiovanniCavallari Oct 18, 2021
500287c
WIP pr coverage
GiovanniCavallari Oct 18, 2021
a66461d
WIP pr coverage
GiovanniCavallari Oct 18, 2021
8bdae5f
WIP pr coverage
GiovanniCavallari Oct 18, 2021
39968d3
Bug to run pipeline
GiovanniCavallari Oct 18, 2021
fdda564
WIP pr coverage
GiovanniCavallari Oct 18, 2021
1fa9c6e
WIP pr coverage
GiovanniCavallari Oct 18, 2021
9918397
Merge branch 'develop' into feature/PPWP-374/device-fingerprint-pix
Oct 18, 2021
3334b94
WIP pr coverage
GiovanniCavallari Oct 18, 2021
d4ae436
WIP pr coverage
GiovanniCavallari Oct 18, 2021
66ac12c
Dynamic Finger Print Link on CHO OFF Page
maicongouveia Oct 18, 2021
fb235a1
Merge pull request #172 from PluginAndPartners/feature/PPWP-361/pr-co…
DouglasCorreiaMeli Oct 19, 2021
06d7ad8
Merge branch 'develop' into feature/PPWP-372/device-fingerprint-off
DouglasCorreiaMeli Oct 19, 2021
a42db0c
Merge pull request #176 from PluginAndPartners/feature/PPWP-372/devic…
DouglasCorreiaMeli Oct 19, 2021
9a66cd7
Merge branch 'develop' into feature/PPWP-374/device-fingerprint-pix
DouglasCorreiaMeli Oct 19, 2021
de44330
change title on data-bind
maicongouveia Oct 19, 2021
5b2df6f
Merge pull request #174 from PluginAndPartners/feature/PPWP-374/devic…
DouglasCorreiaMeli Oct 19, 2021
f59def5
feat: Added docker-compose and Dockerfile to run pipeline locally
GiovanniCavallari Oct 19, 2021
0756711
feat: Added locally test script
DouglasCorreiaMeli Oct 19, 2021
e7991e9
feat: fix dockerfile
DouglasCorreiaMeli Oct 19, 2021
85dc1d3
feat: added code standards files + added link to reports on test exit
GiovanniCavallari Oct 19, 2021
c2731b4
feat: added linter to run locally
GiovanniCavallari Oct 19, 2021
17942bb
feat: added makefile + added build and bash bin
GiovanniCavallari Oct 19, 2021
d825bf7
feat: updated bins
GiovanniCavallari Oct 19, 2021
6f1e6ff
feat: prettifying output
DouglasCorreiaMeli Oct 19, 2021
b620dc1
Merge branch 'feature/PPWP-381/local-pipeline' of github.com:PluginAn…
DouglasCorreiaMeli Oct 19, 2021
6df533a
feat: updated xdebug version
GiovanniCavallari Oct 19, 2021
a673307
feat: updated bins
GiovanniCavallari Oct 19, 2021
67b6082
feat: updated bins
GiovanniCavallari Oct 19, 2021
8b104df
feat: updated bins
GiovanniCavallari Oct 19, 2021
469378b
Merge branch 'feature/PPWP-381/local-pipeline' of github.com:PluginAn…
GiovanniCavallari Oct 19, 2021
71c02d4
feat: fix phpcs script
DouglasCorreiaMeli Oct 20, 2021
8d1c381
Merge pull request #177 from PluginAndPartners/feature/PPWP-381/local…
DouglasCorreiaMeli Oct 20, 2021
aa96fa7
feat: release 3.12.0
DouglasCorreiaMeli Oct 20, 2021
e32c9f4
fix js getFingerPrintLink function
maicongouveia Oct 20, 2021
2631844
Merge pull request #179 from PluginAndPartners/fix/device-fingerprint…
Oct 20, 2021
92d2742
Merge branch 'release/3.12.0' into develop
DouglasCorreiaMeli Oct 20, 2021
f94e3e1
feat: PR coverage percentage set to block pull request
GiovanniCavallari Oct 21, 2021
ae883fc
feat: Added throw on pull-request-coverage-checker
GiovanniCavallari Oct 21, 2021
6f06c81
feat: Bug to run pipeline
GiovanniCavallari Oct 21, 2021
3fb6b0a
feat: Revert Core/Block/Info.php
GiovanniCavallari Oct 21, 2021
60ac683
Merge pull request #178 from PluginAndPartners/release/3.12.0
DouglasCorreiaMeli Oct 21, 2021
7140c98
Merge pull request #181 from PluginAndPartners/feature/PPWP-397/start…
DouglasCorreiaMeli Oct 21, 2021
b0596d7
Merge pull request #182 from PluginAndPartners/release/3.12.1
DouglasCorreiaMeli Oct 25, 2021
d389b47
feat: release 3.12.1
DouglasCorreiaMeli Oct 25, 2021
80859fd
Merge pull request #183 from PluginAndPartners/release/3.12.1
DouglasCorreiaMeli Oct 25, 2021
d544ad0
Update CHANGELOG.md
DouglasCorreiaMeli Oct 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: PHP Code Standards

on: [pull_request]

jobs:
validate-code-standards:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: magento_test
MYSQL_HOST: 127.0.0.1
MYSQL_USER: magento
MYSQL_PASSWORD: p@ssw0rd1
MYSQL_ROOT_PASSWORD: p@ssw0rd1
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
extensions: curl, dom, intl, json, openssl
coverage: xdebug
tools: phpmd

- name: Verify PHP Installation
run: php -v

- name: Composer downgrade to version 1
id: composer-downgrade
run: composer self-update --1

- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Setup cache
uses: pat-s/[email protected]
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install & Build Magento
id: build-magento
run: bash bin/install-mg2.sh

- name: Install MP Plugin
id: install-plugin
run: mv src/* magento2/app/code

- name: Download PHPStan composer dependencies
id: phpstan-composer-dependencies
env:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
run: cd magento2 && composer require --dev phpstan/phpstan

- name: Config Warnings Exit
id: phpcs-warning-configs
run: magento2/vendor/bin/phpcs --config-set ignore_warnings_on_exit 1

- name: Detect Coding Standard Violations
id: phpcs
run: magento2/vendor/bin/phpcs -q --report=full --standard=Magento2 magento2/app/code/MercadoPago/

- name: PHPStan version
id: phpstan-version
run: magento2/vendor/bin/phpstan -V

- name: PHPStan
id: phpstan
run: magento2/vendor/bin/phpstan analyse --error-format=table --level 0 magento2/app/code/MercadoPago/

- name: Run PHPMD
run: phpmd magento2/app/code/MercadoPago/ --ignore-violations-on-exit ansi codesize,unusedcode,naming,cleancode
14 changes: 9 additions & 5 deletions .github/workflows/main.yaml → .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Module Tests
name: PHPUnit

on: [pull_request]

jobs:
magento2-unit-tests:
validate-tests:
runs-on: ubuntu-latest

services:
Expand Down Expand Up @@ -47,8 +47,6 @@ jobs:
COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use the hash of composer.json as the key for your cache if you do not commit composer.lock.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

Expand All @@ -62,8 +60,14 @@ jobs:

- name: Run Unit Test
id: unit-test
run: magento2/vendor/phpunit/phpunit/phpunit --colors=always --whitelist magento2/app/code/MercadoPago/Core --coverage-clover clover.xml --coverage-text magento2/app/code/MercadoPago/Test
run: magento2/vendor/phpunit/phpunit/phpunit --configuration phpunit.xml --coverage-clover clover.xml --coverage-text magento2/app/code/MercadoPago/Test

- name: Repository Minimum Test Coverage
id: repository-coverage
run: php magento2/app/code/MercadoPago/Test/coverage-checker.php clover.xml 80

- name: Pull Request Coverage
id: pull-request-coverage
run: bash bin/pull-request-coverage.sh
env:
PR_NUMBER: ${{ github.event.number }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,6 @@ atlassian*
!/.editorconfig
!.github/
!/bin
!/*.xml
!/docker*

6 changes: 6 additions & 0 deletions CHANGELOG.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.12.1] - 2021-10-20

### Added

- Added device finger print for each payment method.

## [3.11.1] - 2021-10-01

### Fixed
Expand Down
44 changes: 44 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM php:7.3-apache

# Download script to install PHP extensions and dependencies
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
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 git
RUN install-php-extensions intl gd soap bcmath pdo_mysql xsl zip

# Install and configure xdebug
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.mode=coverage" >> /usr/local/etc/php/php.ini

# Install composer and downgrade to version 1
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php \
&& HASH=`curl -sS https://composer.github.io/installer.sig` \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm -rf composer-setup.php \
&& composer self-update --1

# Install phpmd
RUN git clone git://github.com/phpmd/phpmd.git \
&& cd phpmd \
&& git submodule update --init \
&& composer install

# Install Magento 2
COPY bin/install-mg2.sh bin/install-mg2.sh
RUN sh bin/install-mg2.sh

# Install plugin
COPY src magento2/app/code

# phpunit config file
COPY phpunit.xml phpunit.xml

# Fix permissions
RUN chmod 777 -Rf magento2
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY: help bash build linter phpcs phpmd phpstan test
help:
@grep -E '^[a-zA-Z-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-15s %s\n", $$1, $$2}'

bash: ## Access magento 2 docker environment with bash
@sh bin/bash.sh

build: ## Build magento 2 docker environment to run tests and code standards
@sh bin/build.sh

linter: ## Run and validate php code standards (PHPCS, PHPSTAN, PHPMD)
@sh bin/run-linters.sh

phpcs: ## Run and validate code standards with phpcs
@sh bin/run-phpcs.sh

phpmd: ## Run and validate code standards with phpmd
@sh bin/run-phpmd.sh

phpstan: ## Run and validate code standards with stan
@sh bin/run-phpstan.sh

test: ## Run and validate tests with phpunit
@sh bin/run-test.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

# Magento 2 - Mercado Pago Module (v3.11.1)
# Magento 2 - Mercado Pago Module (v3.12.1)

The Mercado Pago plugin for Magento 2 allows you to expand the functionalities of your online store and offer a unique payment experience for your customers.

Expand Down
3 changes: 3 additions & 0 deletions bin/bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker exec -it magento-php /bin/bash
3 changes: 3 additions & 0 deletions bin/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker-compose up -d --build
4 changes: 3 additions & 1 deletion bin/install-mg2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ mv magento2-2.3.6-p1 magento2
cd magento2

echo "Installing..."
composer update
composer install

bin/magento --version
sudo chmod -Rf 777 var/ pub/ generated/ app/etc/env.php
# php -d memory_limit=5G bin/magento indexer:reindex
php -d memory_limit=5G bin/magento
bin/magento setup:upgrade
bin/magento module:enable --all --clear-static-content
php -d memory_limit=5G bin/magento setup:di:compile

rm -rf ../2.3.6-p1.zip
9 changes: 9 additions & 0 deletions bin/pull-request-coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

echo "Getting pull request files..."
export PHPUNIT_FILES=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/PluginAndPartners/cart-magento2/pulls/${PR_NUMBER}/files \
| jq ".[].filename" \
| grep -E 'php"$' \
| xargs)

php magento2/app/code/MercadoPago/Test/pull-request-coverage-checker.php clover.xml 40 $PHPUNIT_FILES
5 changes: 5 additions & 0 deletions bin/run-linters.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

sh bin/run-phpcs.sh
sh bin/run-phpstan.sh
sh bin/run-phpmd.sh
8 changes: 8 additions & 0 deletions bin/run-phpcs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!bin/bash
echo "\n"
echo 🐘🔍 '\033[01;33m RUNNING PHPCS \033[0m'
echo "\n"

docker exec magento-php magento2/vendor/bin/phpcs -q --report=full --standard=Magento2 magento2/app/code/MercadoPago/

echo ✅ "\033[01;32m PHPCS EXECUTED SUCCESSFULLY \n \033[0m"
9 changes: 9 additions & 0 deletions bin/run-phpmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
echo "\n"
echo 🐘🔍 '\033[01;36m RUNNING PHPMD \033[0m'
echo "\n"

docker exec magento-php phpmd/src/bin/phpmd magento2/app/code/MercadoPago/ --ignore-violations-on-exit ansi codesize,unusedcode,naming,cleancode

echo "\n"
echo ✅ "\033[01;32m PHPMD EXECUTED SUCCESSFULLY \n \033[0m"
8 changes: 8 additions & 0 deletions bin/run-phpstan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
echo "\n"
echo 🐘🔍 '\033[01;35m RUNNING PHPSTAN \033[0m'
echo "\n"

docker exec magento-php php -d memory_limit=1G magento2/vendor/bin/phpstan analyse --error-format=table --level 0 magento2/app/code/MercadoPago/

echo ✅ "\033[01;32m PHPSTAN EXECUTED SUCCESSFULLY \n \033[0m"
11 changes: 11 additions & 0 deletions bin/run-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
echo "\n"
echo ⭐ '\033[01;32m RUNNING UNIT TESTS \033[0m'
echo "\n"

docker exec magento-php [ -d "reports/" ] || 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/

echo "\n"
echo ✅ "\033[01;32m SUCCESS - You can access the full report by accessing: http://localhost:8080/reports \n \033[0m"
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"type": "magento2-module",
"version": "3.11.1",
"version": "3.12.1",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand All @@ -29,8 +29,5 @@
},
"require": {
"ext-json": "*"
},
"require-dev": {
"magento/magento-coding-standard": "^6.0"
}
}
66 changes: 65 additions & 1 deletion composer.lock
100644 → 100755

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

Loading