-
Notifications
You must be signed in to change notification settings - Fork 29
65 lines (55 loc) · 1.93 KB
/
ci.yaml
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
63
64
65
name: CI
on:
pull_request:
push:
branches: [ master ]
jobs:
run:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
php:
- '7.3'
- '7.4'
- '8.0'
minimum_versions: [false]
coverage: ['none']
include:
- description: 'Minimum version'
php: '7.3'
minimum_versions: true
- description: 'Log Code Coverage'
php: '7.4'
coverage: 'xdebug'
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: ${{ matrix.php }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage }}
- name: Install dependencies
run: composer install
if: matrix.minimum_versions == false
- name: Install dependencies lower
run: composer update --no-interaction --prefer-lowest
if: matrix.minimum_versions == true
- name: Run PHPUnit tests
run: vendor/bin/phpunit
if: matrix.coverage == 'none'
- name: PHPUnit tests and Log Code coverage
run: ./vendor/bin/phpunit --exclude-group proxy --coverage-clover=coverage.xml
if: matrix.coverage == 'xdebug'
- name: Run codecov
uses: codecov/codecov-action@v1
if: matrix.coverage == 'xdebug'
with:
file: './coverage.xml'
fail_ci_if_error: true