generated from WildCodeSchool/create-js-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (34 loc) · 937 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
name: dev
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- develop
- dev
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache dependencies
id: cache-nextjob
uses: actions/cache@v3
with:
path: |
./node_modules
./backend/node_modules
./frontend/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install package dependencies
if: steps.cache-nextjob.outputs.cache-hit != 'true'
run: npm install
- name: Run linters
run: npx lint-staged --diff="origin/${GITHUB_BASE_REF}...origin/${GITHUB_HEAD_REF}"