-
Notifications
You must be signed in to change notification settings - Fork 187
53 lines (48 loc) · 1.65 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
name: CI
on:
push:
branches:
- master
pull_request: ~
jobs:
check_composer:
name: Check composer.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
- run: composer validate --strict --no-check-lock
tests:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
operating-system: [ ubuntu-latest ]
composer_flags: [ '' ]
include:
- php: '7.4'
composer_flags: '--prefer-lowest'
operating-system: ubuntu-latest
- php: '8.0'
composer_flags: '--prefer-lowest'
operating-system: ubuntu-latest
- php: '8.1'
operating-system: windows-latest
steps:
- name: Prepare git # see https://github.com/actions/checkout/issues/226#issue-606867805
run: git config --global core.autocrlf false && git config --global core.eol lf
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction ${{ matrix.composer_flags }}
- name: Run tests
run: vendor/bin/phpunit -v --colors=always --coverage-clover=coverage.clover
- name: Upload code coverage
continue-on-error: true
run: wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover