-
Notifications
You must be signed in to change notification settings - Fork 34
37 lines (35 loc) · 883 Bytes
/
main.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
name: Commit Checks
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/cache@v3
with:
path: theme/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('theme/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v3
with:
path: theme/vendor
key: ${{ runner.os }}-composer-${{ hashFiles('theme/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install npm
run: |
npm ci
- name: Install composer
run: |
php8.1 $(which composer) install
- name: Run lint
run: |
npm run lint