-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (37 loc) · 1.05 KB
/
test-and-lint-js.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
name: Test & lint JS stuff
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
paths:
- '**.js'
- '**.vue'
- 'package.json'
- 'package-lock.json'
jobs:
test-and-lint-js:
name: Test & lint JS stuff
timeout-minutes: 10
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Cache dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: node_modules
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package.lock') }}
restore-keys: ${{ runner.os }}-npm-dependencies
- name: Set up node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 22
- name: Instal npm dependencies
run: npm clean-install
- name: Run JS linter
run: npm run lint