Skip to content

Merge pull request #58 from shopware/ppi-1030/fixed-wrong-openapi-typ… #177

Merge pull request #58 from shopware/ppi-1030/fixed-wrong-openapi-typ…

Merge pull request #58 from shopware/ppi-1030/fixed-wrong-openapi-typ… #177

Workflow file for this run

name: PHP checks
on:
push:
branches:
- 6.5.x
pull_request:
paths:
- bin/*.php
- src/**/*.php
- tests/**/*.php
- rector.php
- composer.json
workflow_dispatch:
workflow_call:
permissions:
contents: read
id-token: write
jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
PLATFORM_BRANCH: ["v6.5.5.1", "6.5.x"]
fail-fast: false
steps:
- name: Checkout SwagPayPal
uses: actions/checkout@v4
with:
path: custom/plugins/${{ github.event.repository.name }}
- name: Setup SwagPayPal
uses: ./custom/plugins/SwagPayPal/.github/actions/setup-paypal
with:
install-commercial: true
install-admin: true
install-storefront: true
shopware-version: ${{ matrix.PLATFORM_BRANCH }}
- name: Prepare phpstan
working-directory: custom/plugins/${{ github.event.repository.name }}
run: |
composer dump-autoload --dev -d "${GITHUB_WORKSPACE}/custom/plugins/SwagCmsExtensions"
composer dump-autoload --dev -d "${GITHUB_WORKSPACE}/custom/plugins/SwagCommercial"
sed -i 's|reportUnmatchedIgnoredErrors: true|reportUnmatchedIgnoredErrors: false|' ./phpstan.neon.dist
if [[ "${{ matrix.PLATFORM_BRANCH }}" == "v6.6.0.0" ]]; then
sed -i '/type_perfect/d' ./phpstan.neon.dist
sed -i '/narrow_return: true/d' ./phpstan.neon.dist
sed -i '/no_mixed: true/d' ./phpstan.neon.dist
sed -i '/null_over_false: true/d' ./phpstan.neon.dist
fi
- run: |
symfony composer -d custom/plugins/${{ github.event.repository.name }} run phpstan
validate-openapi-typescript:
runs-on: ubuntu-latest
steps:
- name: Setup Extension
uses: shopware/github-actions/setup-extension@main
env:
runner: ${{ runner.environment }}
with:
extensionName: ${{ github.event.repository.name }}
install: true
install-admin: true
install-storefront: true
extraRepositories: |
{
"${{ github.event.repository.name }}": {
"type": "path",
"url": "custom/plugins/${{ github.event.repository.name }}",
"symlink": true
}
}
- working-directory: custom/plugins/${{ github.event.repository.name }}
run: |
${GITHUB_WORKSPACE}/bin/console bundle:dump
composer init:admin
composer openapi:generate
git update-index --refresh || printf ''
git diff-index "${{ github.sha }}" --quiet -- src/Resources/app/administration/src/types/openapi.d.ts || (echo "Please run 'composer openapi:generate' to update openapi.d.ts" && exit 1)