-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (51 loc) · 1.53 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
timeout-minutes: 5
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 Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: 'package.json'
- name: Install Node.js dependencies
run: npm i
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
coverage: none
tools: composer
- name: Install PHP dependencies
uses: ramsey/composer-install@v3
- 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
eslint: true
stylelint: true
stylelint_args: "--allow-empty-input"
php_codesniffer: true