-
Notifications
You must be signed in to change notification settings - Fork 71
44 lines (36 loc) · 1.1 KB
/
common.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: 7.4
- php: 7.3
composerFlags: '--prefer-stable --prefer-lowest'
- php: 8.0
composerFlags: '--ignore-platform-reqs'
steps:
- uses: actions/checkout@v2
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer update ${{ matrix.composerFlags }} --no-interaction --prefer-dist
- name: Tests
run: vendor/bin/phpunit --coverage-clover=coverage.clover
- name: Scrutinizer code coverage upload
if: matrix.php == '7.3'
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover