generated from ryanwelcher/wordpress-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.04 KB
/
linting.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
name: Static Linting
on:
workflow_call:
pull_request:
push:
branches:
- trunk
jobs:
php:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
uses: php-actions/composer@v6
- name: Lint PHP files
run: composer run lint
name: Linting PHP.
other:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run the linting command
run: npm run lint:js
- name: Lint CSS files
run: npm run lint:css
env:
CI: true
name: Linting JavaScript, and CSS.