From 837f1da96ba3e0f7e39734f754091ffa06246108 Mon Sep 17 00:00:00 2001 From: Damien Retzinger Date: Thu, 7 May 2026 10:25:47 -0400 Subject: [PATCH] docs: add docs for check-store --- .github/workflows/check-store-README.md | 58 +++++++++++++++++++++++++ README.md | 2 + 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/check-store-README.md diff --git a/.github/workflows/check-store-README.md b/.github/workflows/check-store-README.md new file mode 100644 index 0000000..d0094d4 --- /dev/null +++ b/.github/workflows/check-store-README.md @@ -0,0 +1,58 @@ +# MageCheck Store + +A Github Workflow that runs various kinds of quality checks for a Magento Store. + +Unlike [MageCheck Extension](./check-extension-README.md), this workflow automatically detects the Magento version from your store's `composer.lock` — no matrix computation required in the calling workflow. + +## Inputs + +See the [check-store.yaml](./check-store.yaml) + +| Input | Description | Required | Default | +| ------------------- | -------------------------------------------------------------------------------------- | -------- | --------- | +| path | The folder of the Magento store that you are testing | false | . | +| composer_cache_key | A key to version the composer cache. Can be incremented if you need to bust the cache. | false | \_mageos | +| store_artifact_name | If provided, download store files from this artifact instead of using actions/checkout | false | "" | + +## Secrets + +| Input | Description | Required | Default | +| ------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | +| composer_auth | Your composer credentials (typically a stringified json object of the contents of your auth.json) | false | NULL | + +## Checks Run + +- **Unit Tests** — runs PHPUnit against custom code in `app/code`. Skipped automatically if no test files are found. +- **Coding Standard** — runs the Magento Coding Standard against `app/code`. Uses your `phpcs.xml` (or `.phpcs.xml`, `phpcs.xml.dist`, `.phpcs.xml.dist`) if one exists, otherwise a sensible default is generated. + +## Usage + +```yml +name: Check Store + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + check-store: + uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@main + secrets: + composer_auth: ${{ secrets.COMPOSER_AUTH }} +``` + +### Usage with a store artifact + +If your pipeline builds or prepares the store in a prior job and uploads it as an artifact, you can pass the artifact name instead of relying on `actions/checkout`: + +```yml +jobs: + check-store: + uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@main + secrets: + composer_auth: ${{ secrets.COMPOSER_AUTH }} +``` diff --git a/README.md b/README.md index dd71689..80f8a0a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/graycoreio/github-actions-magento2) [![Integration Test](https://img.shields.io/github/actions/workflow/status/graycoreio/github-actions-magento2/_internal-integration.yaml?label=Integration%20Test&labelColor=1a1a1a)](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-integration.yaml) [![MageCheck](https://img.shields.io/github/actions/workflow/status/graycoreio/github-actions-magento2/_internal_check_extension.yaml?label=Check%20Extension%20Test&labelColor=1a1a1a)](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal_check_extension.yaml) +[![MageCheck Store](https://img.shields.io/github/actions/workflow/status/graycoreio/github-actions-magento2/_internal-check-store.yaml?label=Check%20Store%20Test&labelColor=1a1a1a)](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-check-store.yaml) @@ -20,6 +21,7 @@ Opinionated Github Actions and Workflows to make building, testing, and maintain | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | [Integration Test](./.github/workflows/integration-README.md) | A Github Workflow that runs the Integration Tests of a Magento Package | | [MageCheck Extension](./.github/workflows/check-extension-README.md) | A Github Workflow that runs various kinds of quality checks for a Magento Extension. | +| [MageCheck Store](./.github/workflows/check-store-README.md) | A Github Workflow that runs various kinds of quality checks for a Magento Store. | ## Actions