-
Notifications
You must be signed in to change notification settings - Fork 432
43 lines (32 loc) · 896 Bytes
/
tests.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
name: Tests
on: ["push", "pull_request"]
jobs:
build:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer validate
- id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ matrix.php }}-
- if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- run: composer run test
- run: composer run lint -- --dry-run
if: ${{ matrix.php <= '8.0' }}