-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.25 KB
/
validate.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
name: Filter Validation
on:
pull_request:
branches: [ master ]
jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.0, 8.3]
steps:
- id: checkout
name: Checkout repo
uses: actions/checkout@v2
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- id: setup-composer
name: Setup Composer
run: |
php -v
wget -O composer-setup.php https://getcomposer.org/installer
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
- id: composer-validation
name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- id: composer-install
name: Install dependencies
run: composer install --prefer-dist --no-progress
- id: php-unit-tests
name: Run test suite
run: composer test