-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.72 KB
/
ci.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
name: CI
on:
- push
- pull_request
env:
timezone: UTC
jobs:
tests:
name: PHP ${{ matrix.php }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php:
- '8.1'
- '8.2'
os: [Ubuntu]
experimental: [false]
include:
- os: MacOS
php: '8.1'
experimental: true
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php }} (${{ matrix.os }})
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ctype dom igbinary libxml mbstring msgpack simplexml xml zip
ini-values: zend.assertions=1, assert.bail=1, opcache.enable=0
tools: composer:v2, pecl
coverage: pcov
- 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@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
composer-${{ runner.os }}-${{ matrix.php-version }}-
composer-${{ runner.os }}-
composer-
- name: Install project dependencies
run: composer update -o --prefer-dist --no-progress --no-interaction
- name: Test with phpunit
run: vendor/bin/phpunit --verbose --coverage-text