forked from SMillerDev/php-resque
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.25 KB
/
php-test.yml
File metadata and controls
47 lines (38 loc) · 1.25 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
name: PHP Tests
on: [push, pull_request]
jobs:
php:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
name: "PHP-${{ matrix.php-versions }}: CS/PHPStan/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: cs2pr, phpcs, phpstan, phpunit
extensions: redis
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Run PHPCS
continue-on-error: true
run: phpcs -q --report=checkstyle lib | cs2pr
- name: Install dependencies
run: composer install
- name: Run PHPStan
run: phpstan analyse lib -l1
- 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