Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1005 Bytes

File metadata and controls

51 lines (39 loc) · 1005 Bytes

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