-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (37 loc) · 1.12 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
name: Lint
on:
push:
branches:
- master
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.4"
coverage: none
tools: composer, cs2pr
- name: Get Composer home directory
id: composer-home
run: |
echo "::set-output name=dir::$(composer config home)"
- name: Install PHP dependencies
uses: ramsey/composer-install@v2
- name: Install composer-normalize
run: composer global require ergebnis/composer-normalize
- name: Make Composer packages available globally
run: |
echo "${PWD}/vendor/bin" >> $GITHUB_PATH
echo "${{ steps.composer-home.outputs.dir }}/vendor/bin" >> $GITHUB_PATH
- name: Lint PHP files
run: phpcs -q --report=checkstyle | cs2pr
- name: Analyze PHP files
run: composer run-script analyze
- name: Lint composer.json
run: composer normalize --dry-run