-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (44 loc) · 1.51 KB
/
test.yaml
File metadata and controls
54 lines (44 loc) · 1.51 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
name: Test
on: [push, pull_request]
jobs:
test:
name: PHP ${{ matrix.php-version }}
runs-on: ubuntu-18.04
strategy:
matrix:
php-version: ['7.2','8.1']
coverage: ['none']
phpunit-versions: [ 'latest' ]
include:
- php-version: '7.2'
- php: "8.1"
php-version: "8.1"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: ${{ matrix.coverage }}
ini-values: memory_limit=-1, post_max_size=256M, max_execution_time=180
php-version: ${{ matrix.php-version }}
extensions: gearman, mbstring, intl
tools: composer
- name: Validate composer.json
run: composer validate --no-check-lock
- name: Install Composer dependencies
uses: ramsey/composer-install@v1
with:
composer-options: "--prefer-dist"
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run PHPUnit
if: matrix.coverage == 'none'
run: vendor/bin/phpunit src/Tests --no-coverage
- name: Run PHPUnit with coverage
if: matrix.coverage != 'none'
run: vendor/bin/phpunit src/Tests --coverage-clover=coverage.clover
- name: Run PHPStan
run: vendor/bin/phpstan analyse