-
Notifications
You must be signed in to change notification settings - Fork 78
84 lines (67 loc) · 2.05 KB
/
php-test.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
81
82
83
name: PHP Tests
on: [push, pull_request]
jobs:
phpunit:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
name: "PHP-${{ matrix.php-versions }}: PHPUnit"
strategy:
matrix:
php-versions: ['7.3', '7.4']
experimental: [false]
include:
- php-versions: '8.0'
experimental: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpunit:5
extensions: redis
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Install dependencies
run: composer install
- name: Install redis
run: sudo apt-get install -y redis-server
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run PHPunit
run: phpunit --configuration phpunit.xml.dist
phpcs:
runs-on: ubuntu-latest
continue-on-error: true
name: "PHPCS"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHPCS
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: cs2pr, phpcs
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Run PHPCS
run: phpcs -q --report=checkstyle lib | cs2pr
phpstan:
runs-on: ubuntu-latest
continue-on-error: false
name: "PHPStan"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHPStan
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: phpstan
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Install dependencies
run: composer install
- name: Run PHPStan
run: phpstan analyse lib -l1