Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

PHPUnit

Runs PHPUnit tests for Shopware extensions.

What it does

  1. Runs PHPUnit tests
  2. Generates code coverage reports
  3. Optionally uploads coverage to Codecov

Inputs

Input Description Required Default
extensionName Your extension name Yes -
uploadCoverage Upload coverage to codecov (requires CODECOV_TOKEN secret) No false
filterName PHPUnit 11 requires a testsuite filter No -

Usage

Basic usage

jobs:
  phpunit:
    uses: shopware/github-actions/phpunit@main
    with:
      extensionName: MyExtensionName

With code coverage

jobs:
  phpunit:
    uses: shopware/github-actions/phpunit@main
    with:
      extensionName: MyExtensionName
      uploadCoverage: true

With testsuite filter (PHPUnit 11)

jobs:
  phpunit:
    uses: shopware/github-actions/phpunit@main
    with:
      extensionName: MyExtensionName
      filterName: unit