-
-
Notifications
You must be signed in to change notification settings - Fork 242
28 lines (27 loc) · 830 Bytes
/
test.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
name: Test
on: [push, pull_request]
jobs:
phpunit:
name: PHP-${{ matrix.php_version }}-${{ matrix.perfer }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php_version:
- 8.0
- 8.1
perfer:
- stable
- lowest
steps:
- uses: actions/checkout@v3
- run: composer validate --strict
- run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
id: composer-cache
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: dependencies-caches-php-${{ hashFiles('**/composer.lock') }}
restore-keys: dependencies-caches-php-
- run: composer update --prefer-dist --no-interaction --no-suggest --prefer-${{ matrix.perfer }}
- run: ./vendor/bin/phpunit