-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 944 Bytes
/
test-php.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
name: Build and Test
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v3
- name: Setup PHP ${{ matrix.versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.versions }}
- name: Validate composer.json
run: composer validate
- name: Add caching for Composer packages
uses: actions/cache/restore@v3
id: composer-restore
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
- name: Run test suite
run: ./vendor/bin/phpunit