-
-
Notifications
You must be signed in to change notification settings - Fork 46
168 lines (132 loc) · 4.65 KB
/
integrate.yaml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: "Integrate"
on:
pull_request: null
push:
branches:
- "master"
jobs:
quality-assurance:
name: "Quality Assurance"
runs-on: "${{ matrix.operating-system }}"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: "phive"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --optimize-autoloader --prefer-dist"
- name: "Install dependencies with phive"
run: "phive install --copy --trust-gpg-keys 4AA394086372C20A,2A8299CE842DD38C,CF1A108D0E7AE720,2DE50EB60C013FFFA831040D12CE0F1D262429A5,E82B2FB314E9906E,51C67305FFC2E5C0"
- name: "Run friendsofphp/php-cs-fixer"
run: "./tools/php-cs-fixer fix --dry-run"
- name: "Run phpstan/phpstan"
run: "./tools/phpstan"
- name: "Run vimeo/psalm"
run: "./tools/psalm"
tests:
name: "Tests"
runs-on: "${{ matrix.operating-system }}"
strategy:
matrix:
operating-system:
- "macos-latest"
- "ubuntu-latest"
- "windows-latest"
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
env:
PHP_EXTENSIONS: "dom, curl, gnupg, mbstring"
PHP_EXTENSIONS_CACHE_KEY: "php-extensions-cache-v1"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Set up extension cache"
id: "cache-env"
uses: "shivammathur/cache-extensions@v1"
with:
extensions: "${{ env.PHP_EXTENSIONS }}"
key: "${{ env.PHP_EXTENSIONS_CACHE_KEY }}"
php-version: "${{ matrix.php-version }}"
- name: "Cache extensions installed with shivammathur/setup-php"
uses: "actions/cache@v4"
with:
path: "${{ steps.cache-env.outputs.dir }}"
key: "${{ steps.cache-env.outputs.key }}"
restore-keys: "${{ steps.cache-env.outputs.key }}"
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
extensions: "${{ env.PHP_EXTENSIONS }}"
ini-values: "display_errors=On, error_reporting=-1, memory_limit=2G"
php-version: "${{ matrix.php-version }}"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --prefer-source"
- name: "Install phpunit/phpunit with phive"
env:
GITHUB_AUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: "php ./phive --no-progress install --trust-gpg-keys D8406D0D82947747293778314AA394086372C20A phpunit@^9.5"
- name: "Run tests with phpunit/phpunit"
run: "./tools/phpunit"
smoke-tests:
name: "Smoke Tests"
runs-on: "${{ matrix.operating-system }}"
strategy:
matrix:
operating-system:
- "macos-latest"
- "ubuntu-latest"
- "windows-latest"
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
env:
PHP_EXTENSIONS: "dom, curl, gnupg, mbstring"
PHP_EXTENSIONS_CACHE_KEY: "php-extensions-cache-v1"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Set up extension cache"
id: "cache-env"
uses: "shivammathur/cache-extensions@v1"
with:
extensions: "${{ env.PHP_EXTENSIONS }}"
key: "${{ env.PHP_EXTENSIONS_CACHE_KEY }}"
php-version: "${{ matrix.php-version }}"
- name: "Cache extensions installed with shivammathur/setup-php"
uses: "actions/cache@v4"
with:
path: "${{ steps.cache-env.outputs.dir }}"
key: "${{ steps.cache-env.outputs.key }}"
restore-keys: "${{ steps.cache-env.outputs.key }}"
- name: "Set up PHP"
uses: "shivammathur/setup-php@v2"
with:
extensions: "${{ env.PHP_EXTENSIONS }}"
ini-values: "display_errors=On, error_reporting=-1, memory_limit=2G"
php-version: "${{ matrix.php-version }}"
- name: "Validate composer.json"
run: "composer validate --strict"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --prefer-source"
- name: "Install theseer/autoload with phive"
env:
GITHUB_AUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: "php ./phive --no-progress install --trust-gpg-keys BEEB9AED51C28445FAB142228DDB46C4EA2EBCDC phpab"