Integration Tests for a Magento Package

June 11, 2026 · View on GitHub

Deprecated — use MageCheck Extension instead. Scheduled for removal in v10.

A Github Workflow that runs the Integration Tests of a Magento Package

Inputs

See the integration.yaml

InputDescriptionRequiredDefault
matrixJSON string of version matrix for Magento. Must include a services key (pass include_services: true to the supported-version action).trueNULL
fail-fastSame as Github's fail-fastfalsetrue
package_nameThe name of the packagetrueNULL
use_local_sourceWhether or not you want to test your local package or not.falsetrue
source_folderThe source folder of the packagefalse$GITHUB_WORKSPACE
magento_directoryThe folder where Magento will be installedfalse../magento2
magento_repositoryWhere to install Magento fromfalsehttps://mirror.mage-os.org/
test_commandThe integration test command to runfalse"../../../vendor/bin/phpunit"
composer_cache_keyA key to version the composer cache. Can be incremented if you need to bust the cache.false""

Secrets

InputDescriptionRequiredDefault
composer_authJSON string of composer credentialsfalseNULL

Matrix Format

The Magento matrix format outlined by the supported versions action.

Usage

name: Integration Test

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main

jobs:
  compute_matrix:
      runs-on: ubuntu-latest
      outputs:
        matrix: ${{ steps.supported-version.outputs.matrix }}
      steps:
        - uses: actions/checkout@v6
        - uses: graycoreio/github-actions-magento2/supported-version@v8.6.0 # x-release-please-version
          with:
            include_services: true
          id: supported-version
  integration-workflow:
    needs: compute_matrix
    uses: graycoreio/github-actions-magento2/.github/workflows/integration.yaml@v8.6.0 # x-release-please-version
    with:
      package_name: my-vendor/package
      matrix: ${{ needs.compute_matrix.outputs.matrix }}
      test_command: ../../../vendor/bin/phpunit ../../../vendor/my-vendor/package/Test/Integration
    secrets:
      composer_auth: ${{ secrets.COMPOSER_AUTH }}