forked from darsain/grunt-checkrepo
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 937 Bytes
/
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
name: Coding Standards
on:
pull_request:
push:
branches:
- develop
- main
- 'feature/**'
- 'fix/**'
env:
DEFAULT_NODE_VERSION: 14
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
# https://github.com/marketplace/actions/setup-node-js-environment
with:
node-version: ${{ env.DEFAULT_NODE_VERSION }}
- name: Cache node_modules
uses: actions/cache@v2
id: cache-nodemodules
with:
path: node_modules
key: ${{ runner.os }}-${{ env.DEFAULT_NODE_VERSION }}-nodemodules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
run: npm ci
- name: Lint
run: npm run lint