This GitHub Action validates a Shopware project code style and structure.
- Checks out your repository (optional)
- Sets up PHP with the specified version
- Installs Shopware CLI
- Installs composer dependencies
- Validates the project structure using
shopware-cli project validate - Checks code style using
shopware-cli project format --dry-run
| Input | Description | Required | Default |
|---|---|---|---|
phpVersion |
PHP version to use | No | 8.4 |
path |
Path to the project | No | . |
skipCheckout |
Skip the checkout step | No | false |
name: Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: shopware/github-actions/project-validate@main- uses: shopware/github-actions/project-validate@main
with:
phpVersion: '8.3'- uses: shopware/github-actions/project-validate@main
with:
path: './shopware'- uses: actions/checkout@v6
- uses: shopware/github-actions/project-validate@main
with:
skipCheckout: 'true'- Your project must have a
composer.jsonfile - The project should follow Shopware project structure