-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (77 loc) · 3.56 KB
/
phpstan.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
75
76
77
78
name: Magento 2 PHPStan
on: [push]
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
env:
COMPOSER_AUTH_JSON: |
{
"http-basic": {
"repo.magento.com": {
"username": "${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}",
"password": "${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}"
}
}
}
- uses: actions/checkout@v4
- name: Create composer project
run: composer create-project --no-install --no-interaction --no-plugins --repository-url=https://repo-magento-mirror.fooman.co.nz/ magento/project-community-edition:2.4.5-p8 /home/runner/work/magento
- name: Create magento2-adminhtml directory in package-source
run: mkdir -p /home/runner/work/magento/package-source/multisafepay/magento2-adminhtml
- name: Move repository content
run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/magento2-adminhtml
- name: Checkout Magento 2 Core Repository
continue-on-error: true
uses: actions/checkout@v4
with:
repository: multisafepay/magento2-internal-core
token: ${{ secrets.GLOBAL_GITHUB_TOKEN }}
ref: ${{ github.ref_name }}
- name: Create magento2-core directory in package-source
if: success()
run: mkdir -p /home/runner/work/magento/package-source/multisafepay/magento2-core
- name: Move Magento 2 Core Repository content
if: success()
continue-on-error: true
run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/magento2-core
- name: Checkout PHP-SDK
continue-on-error: true
uses: actions/checkout@v4
with:
repository: multisafepay/php-sdk-internal
token: ${{ secrets.GLOBAL_GITHUB_TOKEN }}
ref: ${{ github.ref_name }}
- name: Create php-sdk directory in package-source
if: success()
run: mkdir -p /home/runner/work/magento/package-source/multisafepay/php-sdk
- name: Move PHP-SDK Repository content
if: success()
continue-on-error: true
run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/php-sdk
- name: Add composer plugins
working-directory: /home/runner/work/magento
run: composer config --no-plugins allow-plugins true
- name: Add MultiSafepay packages to Composer
working-directory: /home/runner/work/magento
run: composer config repositories.multisafepay "path" "package-source/multisafepay/*"
- name: Add module to composer
working-directory: /home/runner/work/magento
run: composer require multisafepay/magento2-adminhtml --no-update --no-interaction
- name: Install composer dependencies
working-directory: /home/runner/work/magento
run: composer install --no-interaction
- name: Install PHPStan extension installer
working-directory: /home/runner/work/magento
run: composer require --dev phpstan/extension-installer
- name: Install PHPStan Magento extension
working-directory: /home/runner/work/magento
run: composer require --dev bitexpert/phpstan-magento
- name: Run PHPStan
working-directory: /home/runner/work/magento
run: vendor/bin/phpstan analyse -c vendor/multisafepay/magento2-adminhtml/phpstan.neon --error-format github