Skip to content

Commit ae54d94

Browse files
committed
Fix SonarCloud coverage reports
1 parent 8af34a4 commit ae54d94

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,15 @@ phpunit-run:
142142
cp vendor/adyen/module-payment/Test/phpunit.xml.dist dev/tests/unit/phpunit.xml
143143
cd dev/tests/unit; \
144144
../../../vendor/bin/phpunit \
145-
--coverage-clover=../../../build/clover.xml \
146-
--log-junit=../../../build/tests-log.xml \
145+
--coverage-clover=../../../build/clover.xml.dist \
146+
--log-junit=../../../build/tests-log.xml.dist \
147147
-c phpunit.xml \
148148
../../../vendor/adyen/module-payment/Test/Unit
149149

150+
phpunit-fix-report:
151+
sed '/file/s/\/var\/www\/html\/vendor\/adyen\/module-payment\///g' ${MAGENTO_ROOT}/build/tests-log.xml.dist >> ${MAGENTO_ROOT}/build/tests-log.xml
152+
sed '/file/s/\/var\/www\/html\/vendor\/adyen\/module-payment\///g' ${MAGENTO_ROOT}/build/clover.xml.dist >> ${MAGENTO_ROOT}/build/clover.xml
153+
150154
codesniffer-run:
151155
vendor/bin/phpcs --standard=Magento2 \
152156
--extensions=php,phtml \

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ jobs:
6262
- name: Run PHPUnit
6363
run: docker exec magento2-container make phpunit-run
6464

65+
- name: Format PHPUnit coverage reports
66+
run: docker exec magento2-container make phpunit-fix-report
67+
6568
- name: SonarCloud Scan
6669
if: ${{ env.SONAR_TOKEN }}
6770
uses: SonarSource/sonarqube-scan-action@master

0 commit comments

Comments
 (0)