Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: add new task cmd for local unit test #217

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ tasks:
cmds:
- docker compose run --rm magento ./vendor/phpunit/phpunit/phpunit -c app/code/Alma/MonthlyPayments/Test/Unit/phpunit.ci.xml --coverage-text

test-local:
desc: Run Unit Tests with coverage
deps:
- docker:build
cmds:
- docker compose run --rm magento ./vendor/phpunit/phpunit/phpunit -c app/code/Alma/MonthlyPayments/Test/phpunit.xml.dist --coverage-text

dist:
desc: Build the zip file of the module
deps:
Expand Down
14 changes: 14 additions & 0 deletions Test/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,22 @@
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
colors="true"
columns="max"
testdox = "true"
convertErrorsToExceptions = "true"
convertNoticesToExceptions = "true"
convertWarningsToExceptions = "true"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="./framework/bootstrap.php">

<coverage includeUncoveredFiles="true"
pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="true">
<include>
<directory suffix=".php">.</directory>
</include>
</coverage>

<testsuites>
<testsuite name="Alma_Unit_Tests">
<directory>./Unit</directory>
Expand Down
Loading