-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (78 loc) · 2.56 KB
/
magento_platform_test.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
79
80
81
82
83
84
85
86
87
88
89
---
name: Magento Platform Test
on:
push:
branches:
- 'master'
schedule:
- cron: '0 1 * * *'
jobs:
phpstan:
name: PHPStan Magento Integration Test
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping"
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:2.4.2
php-version: 8.1
extensions: mbstring, intl
coverage: none
- name: Copy PHPStanTests module to app/code
working-directory: ./magento
run: |
mkdir -p app/code/BitExpert
cp -r ../src/BitExpert_PHPStanTests/ app/code/BitExpert/PHPStanTests
- name: Install Composer dependencies
working-directory: ./magento
run:
composer install --no-interaction;
- name: PHPStan version
working-directory: ./magento
run:
./vendor/bin/phpstan --version
- name: Install Magento platform
working-directory: ./magento
run: |
mysqladmin -h127.0.0.1 -P ${{ job.services.mysql.ports[3306] }} -uroot -proot create magento;
bin/magento setup:install \
--db-host="127.0.0.1:${{ job.services.mysql.ports[3306] }}" \
--db-user=root \
--db-password=root \
--db-name=magento \
--cleanup-database \
--session-save=db \
--backend-frontname=admin \
--timezone="Europe/Berlin" \
--currency="EUR" \
--base-url="http://github.phpstan-magento.test/" \
--use-rewrites=1 \
--use-secure=1 \
--use-secure-admin=1 \
--admin-user=admin \
--admin-password=Password123 \
--admin-firstname=Armin \
--admin-lastname=Admin \
--admin-email="admin@example.com" \
--disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch6,Magento_Elasticsearch \
--use-rewrites=1 \
--no-interaction;
bin/magento setup:di:compile;
- name: Run PHPStan against app/code
working-directory: ./magento
run:
./vendor/bin/phpstan analyse
- name: Run PHPStan (Bleeding Edge) against app/code
working-directory: ./magento
run:
./vendor/bin/phpstan analyse -c bleedingEdge.neon