-
Notifications
You must be signed in to change notification settings - Fork 26
41 lines (32 loc) · 1.16 KB
/
linters.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
name: Static Analysis (Linting)
# This workflow is triggered on pushes to trunk, and any PRs.
on:
push:
branches: [trunk]
pull_request:
jobs:
check:
name: Lint everything
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Install NodeJS
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.3.0
with:
node-version-file: '.nvmrc'
cache: yarn
- name: Install dependencies & setup configs
run: |
yarn setup:tools
- name: Lint CSS
run: |
yarn workspace wporg-main-2022-theme lint:css
- name: Lint JS
run: |
yarn workspace wporg-main-2022-theme lint:js
- name: Lint PHP
run: |
composer run lint source/wp-content/themes/wporg-main-2022
composer run lint source/wp-content/mu-plugins/theme-switcher.php
composer run lint env