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

Commit

Permalink
WIP pr coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniCavallari committed Oct 18, 2021
1 parent 908db95 commit 1dc6415
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:

- name: Run Unit Test
id: unit-test
run: magento2/vendor/phpunit/phpunit/phpunit --configuration teste.xml --coverage-clover clover.xml --coverage-text magento2/app/code/MercadoPago/Test
run: magento2/vendor/phpunit/phpunit/phpunit --configuration phpunit-pipeline.xml --coverage-clover clover.xml --coverage-text magento2/app/code/MercadoPago/Test $PHPUNIT_FILES

- name: Repository Minimum Test Coverage
id: repository-coverage
Expand Down
Empty file modified CHANGELOG.md
100644 → 100755
Empty file.
18 changes: 5 additions & 13 deletions bin/get-pull-request-files.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
#!/bin/bash

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

echo "Generating phpunit.xml with pull request files..."
command > teste.xml
echo "<phpunit colors=\"true\">" >> teste.xml
echo "<testsuite name=\"Tests\">" >> teste.xml
echo "<directory suffix=\".php\">magento2/app/code/MercadoPago/Test</directory>" >> teste.xml
echo "</testsuite>" >> teste.xml
echo "<filter>" >> teste.xml
echo "<whitelist>" >> teste.xml
echo "<directory suffix=\".php\">magento2/app/code/MercadoPago</directory>" >> teste.xml
echo "</whitelist>" >> teste.xml
echo "</filter>" >> teste.xml
echo "</phpunit>" >> teste.xml
echo $PHPUNIT_FILES
Empty file modified composer.lock
100644 → 100755
Empty file.
Empty file modified phpunit.xml
100644 → 100755
Empty file.

0 comments on commit 1dc6415

Please sign in to comment.