-
Notifications
You must be signed in to change notification settings - Fork 7
70 lines (57 loc) · 1.86 KB
/
test.yml
File metadata and controls
70 lines (57 loc) · 1.86 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
tests:
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
os: [ubuntu-latest]
dependency-versions: ['lowest', 'highest']
runs-on: ${{ matrix.os }}
name: Tests on PHP ${{ matrix.php-version }} with ${{ matrix.dependency-versions }} dependencies
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validate composer.json
run: composer validate --strict --no-check-lock
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- 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"
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependency-versions }}
- name: Run test suite
run: composer run-script test
static-analysis:
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.5']
os: [ubuntu-latest]
dependency-versions: ['highest']
runs-on: ${{ matrix.os }}
name: PHPStan on PHP ${{ matrix.php-version }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependency-versions }}
- name: Run PHPStan
run: vendor/bin/phpstan analyse --ansi