-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.16 KB
/
coding-standards.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
name: Coding Standards
on:
# Checks are required to pass for each PR so we cannot disable them for documentation-only changes.
pull_request_target:
branches:
- master
push:
branches:
- master
paths-ignore:
- '**.md'
jobs:
check:
name: Set up and run linters
runs-on: ubuntu-latest
steps:
- name: Check out repository (push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v4
- name: Check out repository (pull_request_target)
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
coverage: none
tools: composer
- name: Install PHP dependencies
uses: ramsey/composer-install@v2
- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
- name: Run linters
uses: wearerequired/lint-action@v2
with:
continue_on_error: false
php_codesniffer: true