-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 996 Bytes
/
lint.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: Lint
on:
push:
branches:
- develop
paths-ignore:
- "**/*.md"
- ".git*"
- ".vscode/**"
pull_request:
branches:
- main
- develop
paths-ignore:
- "**/*.md"
- ".git*"
- ".vscode/**"
jobs:
lint:
name: npm run lint
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Cache packages
uses: actions/cache@v4
id: cache_npm_packages
env:
cache-name: cache-npm-packages
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install packages
if: ${{ steps.cache_npm_packages.outputs.cache-hit != 'true' }}
run: npm i
- name: Run lint
run: npm run lint