-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.17 KB
/
lint.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
name: Lint PR
on:
pull_request:
branches: [ main ]
jobs:
main:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-version }}
steps:
- name: Code Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Setup php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2, php-cs-fixer, vimeo/psalm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install composer
run: composer install
- name: Check Php code style
run: php-cs-fixer fix
- uses: stefanzweifel/git-auto-commit-action@v4
with:
push_options: '--force'
file_pattern: '*.php'
branch: ${{ github.event.pull_request.head.ref }}
- name: Run Psalm Static Analysis
run: psalm --output-format=github