-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (33 loc) · 1.16 KB
/
php.yml
File metadata and controls
43 lines (33 loc) · 1.16 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
name: PHP Composer
on: [push, pull_request]
jobs:
build:
name: Run tests on ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install Composer dependencies
uses: "ramsey/composer-install@v3"
- name: Build Parser
run: php grammar/rebuildParser.php
- name: Run PHPUnit
run: composer test
- name: Perform static analysis
run: composer analyze -- --error-format=github
if: ${{ matrix.php == '8.5' }}
- name: Check Formatting
run: vendor/bin/php-cs-fixer check -v --show-progress=dots --stop-on-violation --using-cache=no
if: ${{ matrix.php == '8.5' }}