-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (44 loc) · 1.31 KB
/
ci.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
name: "CI"
on:
pull_request:
push:
branches:
- "master"
jobs:
tests:
name: "Run Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: none
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
tools: composer:v2, cs2pr
- name: "Cache dependencies"
uses: "actions/cache@v2"
with:
path: |
~/.composer/cache
vendor
key: "php-${{ matrix.php-version }}"
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
- name: "EasyCodingStandards for src"
run: "vendor/bin/ecs check src tests --no-interaction --no-progress-bar"
- name: "PhpStan for src"
run: "vendor/bin/phpstan analyse --error-format=checkstyle src --level=8 | cs2pr"
- name: "PhpStan for tests"
run: "vendor/bin/phpstan analyse --error-format=checkstyle tests --level=6 | cs2pr"
- name: "PHPUnit Test"
run: "vendor/bin/phpunit tests/BaseTest.php"