forked from imiphp/imi
-
Notifications
You must be signed in to change notification settings - Fork 0
153 lines (127 loc) · 7.74 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: Static Code Analysis
on:
push:
paths-ignore:
- "doc/**"
- "mddoc/**"
- "res/**"
- "website/**"
- ".markdownlint.json"
- "README.md"
pull_request:
jobs:
tests:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
swoole-docker: [4.8-php7.4]
env:
SWOOLE_DOCKER_VERSION: ${{ matrix.swoole-docker }}
POSTGRESQL_VERSION: v4.8.0
ENV_SERVICE: swoole-only
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare
run: |
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
docker exec ${ENV_SERVICE} php -v
docker exec ${ENV_SERVICE} php -m
docker exec ${ENV_SERVICE} php --ri swoole
docker exec ${ENV_SERVICE} composer -V
docker exec ${ENV_SERVICE} composer update --no-interaction --prefer-dist --no-progress
docker exec ${ENV_SERVICE} bash -c "cd split-repository && composer install --no-interaction --prefer-dist --no-progress"
echo "test_prepared=1" >> $GITHUB_ENV
- name: Analyse core
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G
- name: Analyse access-control
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/access-control/vendor/autoload.php src/Components/access-control
- name: Analyse amqp
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/amqp/vendor/autoload.php src/Components/amqp
- name: Analyse apidoc
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/apidoc/vendor/autoload.php src/Components/apidoc
- name: Analyse fpm
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/fpm/vendor/autoload.php src/Components/fpm
- name: Analyse grpc
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/grpc/vendor/autoload.php src/Components/grpc
- name: Analyse jwt
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/jwt/vendor/autoload.php src/Components/jwt
- name: Analyse kafka
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/kafka/vendor/autoload.php src/Components/kafka
- name: Analyse mqtt
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/mqtt/vendor/autoload.php src/Components/mqtt
- name: Analyse pgsql
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/pgsql/vendor/autoload.php src/Components/pgsql
- name: Analyse queue
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/queue/vendor/autoload.php src/Components/queue
- name: Analyse rate-limit
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/rate-limit/vendor/autoload.php src/Components/rate-limit
- name: Analyse roadrunner
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/roadrunner/vendor/autoload.php src/Components/roadrunner
- name: Analyse rpc
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/rpc/vendor/autoload.php src/Components/rpc
- name: Analyse shared-memory
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/shared-memory/vendor/autoload.php src/Components/shared-memory
- name: Analyse smarty
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/smarty/vendor/autoload.php src/Components/smarty
- name: Analyse snowflake
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/snowflake/vendor/autoload.php src/Components/snowflake
- name: Analyse swoole
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/swoole/vendor/autoload.php src/Components/swoole
- name: Analyse swoole-tracker
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/swoole-tracker/vendor/autoload.php src/Components/swoole-tracker
- name: Analyse workerman
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/workerman/vendor/autoload.php src/Components/workerman
- name: Analyse workerman-gateway
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/workerman-gateway/vendor/autoload.php src/Components/workerman-gateway
- name: Analyse macro
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/macro/vendor/autoload.php src/Components/macro
- name: Analyse phar
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./vendor/bin/phpstan analyse --memory-limit 1G --configuration=phpstan-components.neon --autoload-file=src/Components/phar/vendor/autoload.php src/Components/phar