mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
docs: add docs for check-store
This commit is contained in:
@@ -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 }}
|
||||
```
|
||||
@@ -5,6 +5,7 @@
|
||||

|
||||
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-integration.yaml)
|
||||
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal_check_extension.yaml)
|
||||
[](https://github.com/graycoreio/github-actions-magento2/actions/workflows/_internal-check-store.yaml)
|
||||
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user