-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (70 loc) · 2.35 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '5.6'
phpunit_config: 'phpunit.xml.dist' # PHPUnit 5.7
- php: '7.0'
phpunit_config: 'phpunit.xml.dist' # PHPUnit 6.5
- php: '7.1'
phpunit_config: 'phpunit7.xml.dist' # PHPUnit 7.5
- php: '7.2'
phpunit_config: 'phpunit7.xml.dist' # PHPUnit 8.5
- php: '7.3'
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
- php: '7.4'
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
- php: '8.0'
phpunit_config: 'phpunit9.xml.dist' # PHPUnit 9.6
- php: '8.1'
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
- php: '8.2'
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
- php: '8.3'
phpunit_config: 'phpunit10.xml.dist' # PHPUnit 10.5
fail-fast: false
name: Tests (PHP ${{ matrix.php }})
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: xdebug
extensions: pdo_sqlite
- name: Install Dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: "highest"
- name: Run Tests
env:
COLUMNS: 130
LINES: 30
run: |
mkdir -p build/logs
vendor/bin/phpunit --configuration ${{ matrix.phpunit_config }} --coverage-clover=coverage.clover
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Upload Coverage to Scrutinizer CI (PHP < 8.0)
if: "${{ matrix.php < '8.0' }}"
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --repository=g/console-helpers/svn-buddy --format=php-clover coverage.clover
- name: Upload Coverage to Scrutinizer CI (PHP >= 8.0)
if: "${{ matrix.php >= '8.0' }}"
run: |
rm composer.lock
composer require scrutinizer/ocular
vendor/bin/ocular code-coverage:upload --repository=g/console-helpers/svn-buddy --format=php-clover coverage.clover