-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (38 loc) · 1.52 KB
/
testing.yml
File metadata and controls
48 lines (38 loc) · 1.52 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
name: Testing
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
include:
- operating-system: ubuntu-latest
php-version: '7.2'
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer update --prefer-dist --no-progress
- name: Check PHP syntax with PHP Parallel Lint
run: ./vendor/bin/parallel-lint src/ tests/
- name: Run Psalm static code analysis
run: ./vendor/bin/psalm
if: contains('7.2 7.3 7.4 8.0 8.1 8.2 8.3', matrix.php-version)
- name: Run PHPUnit test suite
run: ./vendor/bin/phpunit
- name: Check code coverage
run: ./vendor/bin/coverage-check clover.xml 100
if: contains('7.2 7.3 7.4', matrix.php-version)