-
Notifications
You must be signed in to change notification settings - Fork 35
74 lines (70 loc) · 2.56 KB
/
php.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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)