mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
aa1b545010
Files under `.github/workflows/` require the `workflow` PAT scope to modify. Once release-please's `extra-files` glob started rewriting these README files on release, the action failed with "Error adding to tree." Moving the docs to `docs/workflows/` lets the existing token update them without needing a wider scope.
4.2 KiB
4.2 KiB
Integration Tests for a Magento Package
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
| Input | Description | Required | Default |
|---|---|---|---|
| matrix | JSON string of version matrix for Magento. Must include a services key (pass include_services: true to the supported-version action). |
true | NULL |
| fail-fast | Same as Github's fail-fast | false | true |
| package_name | The name of the package | true | NULL |
| use_local_source | Whether or not you want to test your local package or not. | false | true |
| source_folder | The source folder of the package | false | $GITHUB_WORKSPACE |
| magento_directory | The folder where Magento will be installed | false | ../magento2 |
| magento_repository | Where to install Magento from | false | https://mirror.mage-os.org/ |
| test_command | The integration test command to run | false | "../../../vendor/bin/phpunit" |
| composer_cache_key | A key to version the composer cache. Can be incremented if you need to bust the cache. | false | "" |
Secrets
| Input | Description | Required | Default |
|---|---|---|---|
| composer_auth | JSON string of composer credentials | false | NULL |
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@v7 # x-release-please-major
with:
include_services: true
id: supported-version
integration-workflow:
needs: compute_matrix
uses: graycoreio/github-actions-magento2/.github/workflows/integration.yaml@v7 # x-release-please-major
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 }}