-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (55 loc) · 1.74 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: PHP Composer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
name: "Tests ${{ matrix.php-version }} deps ${{ matrix.dependency-versions }}"
strategy:
fail-fast: false
matrix:
# normal, highest, non-dev installs
php-version: [ '8.2', '8.1', '8.0' ]
dependency-versions: [ 'highest', 'lowest' ]
include:
# - php-version: '8.2'
# dependency-versions: 'lowest'
- php-version: '8.1'
dependency-versions: 'lowest'
- php-version: '8.0'
dependency-versions: 'lowest'
- php-version: '8.2'
dependency-versions: 'highest'
- php-version: '8.1'
dependency-versions: 'highest'
- php-version: '8.0'
dependency-versions: 'highest'
steps:
- uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "xdebug"
php-version: "${{ matrix.php-version }}"
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: "Composer install"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "--prefer-dist --no-cache --no-progress"
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run test suite
run: ./vendor/bin/phpunit