-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (58 loc) · 1.89 KB
/
main.yml
File metadata and controls
61 lines (58 loc) · 1.89 KB
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
name: Run tests
on: [push]
jobs:
unit-tests:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
test: [phpunit, phan, phpmd, phpcs, phpcbf, phpmnd, churn, phpstan, infection, psalm]
name: ${{ matrix.test }} on PHP${{ matrix.php }} with ${{ matrix.dependency-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
extensions: dom, libxml, mbstring
tools: prestissimo
coverage: xdebug
- name: Composer self-update
run: |
composer self-update
- name: Composer update
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Composer test-${{ matrix.test }}-${{ matrix.os }}
run: |
composer test-${{ matrix.test }}-${{ matrix.os }}
coverage:
name: PHPUnit test coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: 7.4
extensions: dom, libxml
tools: prestissimo, phpunit
coverage: xdebug
- name: Composer self-update
run: |
composer self-update
- name: Composer update
run: |
composer update --prefer-dist --no-interaction --no-suggest
- name: Get coverage
run: |
phpunit --coverage-clover=coverage.xml
- name: Send coverage report
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml