PPI-1041 - Updated lint and test suite #164
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHP checks | |
on: | |
push: | |
branches: | |
- trunk | |
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.6.0.0", "trunk"] | |
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: | | |
composer -d custom/plugins/${{ github.event.repository.name }} run phpstan | |
validate-openapi-typescript: | |
runs-on: ubuntu-latest | |
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-admin: true | |
install-storefront: true | |
shopware-version: ${{ matrix.PLATFORM_BRANCH }} | |
- 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) |