-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (40 loc) · 1.27 KB
/
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
49
50
51
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
php-versions:
- '7.4'
- '8.0'
- '8.3'
include:
- php-version: '8.4'
experimental: true
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Setup PHP Version ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Check syntax error in sources
run: find . -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l
- name: Clear cache of Composer
run: composer clear-cache
- name: Validate Composer.json and composer.lock
run: composer update
- name: Install dependencies
run: composer install -q -n -a --no-progress --prefer-dist
- name: Check code styles
continue-on-error: true
run: ./vendor/bin/phpcs
- name: Run Psalm Checks script from composer.json
run: composer ps