-
Notifications
You must be signed in to change notification settings - Fork 11
79 lines (67 loc) · 2.46 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
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
name: CI
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
jobs:
tests:
name: PHP ${{ matrix.php }} tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-latest
- windows-latest
php:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
experimental: [ false ]
include:
- php: 8.2
os: ubuntu-latest
experimental: true
composer-options: '--ignore-platform-reqs'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Install composer dependencies
uses: ramsey/composer-install@v1
with:
composer-options: ${{ matrix.composer-options }}
- name: Setup PCOV
if: matrix.php == 7.1
run: |
composer require pcov/clobber --dev --no-interaction
vendor/bin/pcov clobber
- name: Check Coding standards
run: vendor/bin/phpcs
- name: Run PHPStan
run: vendor/bin/phpstan analyse --ansi
- name: Run Psalm
run: vendor/bin/psalm --taint-analysis --output-format=github
- name: Run Tests
run: vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
- name: Upload coverage results to Coveralls
if: matrix.experimental == false
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls --dev --no-interaction --with-all-dependencies
vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml --verbose