@@ -148,3 +148,54 @@ jobs:
148
148
# Execution
149
149
- name : Check Coding Standards
150
150
run : vendor/bin/phpcs --standard=phpcs.xml
151
+
152
+ test :
153
+ name : Build (${{matrix.php}}, ${{ matrix.os }}, ${{ matrix.stability }})
154
+ runs-on : ${{ matrix.os }}
155
+
156
+ strategy :
157
+ fail-fast : false
158
+ matrix :
159
+ php : [ '7.4', '8.0', '8.1' ]
160
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
161
+ stability : [ prefer-lowest, prefer-stable ]
162
+
163
+ steps : # General Steps
164
+ - name : Set Git To Use LF
165
+ run : |
166
+ git config --global core.autocrlf false
167
+ git config --global core.eol lf
168
+ - name : Checkout
169
+ uses : actions/checkout@v2
170
+
171
+ # Install PHP Dependencies
172
+ - name : Setup PHP ${{ matrix.php }}
173
+ uses : shivammathur/setup-php@v2
174
+ with :
175
+ php-version : ${{ matrix.php }}
176
+ # PHP Extras
177
+ coverage : pcov
178
+ tools : pecl
179
+ ini-values : " memory_limit=-1"
180
+ - name : Validate Composer
181
+ run : composer validate
182
+ - name : Get Composer Cache Directory
183
+ # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
184
+ id : composer-cache
185
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
186
+ - name : Restore Composer Cache
187
+ uses : actions/cache@v1
188
+ with :
189
+ path : ${{ steps.composer-cache.outputs.dir }}
190
+ key : ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
191
+ restore-keys : ${{ runner.os }}-${{ matrix.php }}-composer-
192
+ - name : Install Dependencies
193
+ uses : nick-invision/retry@v1
194
+ with :
195
+ timeout_minutes : 5
196
+ max_attempts : 5
197
+ command : composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress
198
+
199
+ # Execution
200
+ - name : Execute Tests
201
+ run : vendor/bin/phpunit
0 commit comments