-
Notifications
You must be signed in to change notification settings - Fork 49
49 lines (46 loc) · 1.61 KB
/
main.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
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
max-parallel: 2
matrix:
os:
- ubuntu-latest
php:
- 8.0
- 7.4
- 7.2
experimental: [false]
name: PHP ${{ matrix.php }} test on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
continue-on-error: ${{ matrix.experimental }}
- name: Testing with PHPUnit
run: vendor/bin/phpunit
continue-on-error: ${{ matrix.experimental }}