-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.07 KB
/
test-php.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
name: PHP Quality Tests
on:
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
checks: write
issues: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [
8.1,
8.2,
8.3
]
name: Test PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PHP
uses: setup-php/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: cs2pr
- name: Install dependencies
run: composer install
- name: Run lint
run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr
- name: Run tests
run: composer run phpunit
- name: Run static analysis
run: ./vendor/bin/phpstan --error-format=checkstyle --memory-limit=1G analyse | cs2pr
- name: Run coverage-check
run: composer run coverage-check