-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.27 KB
/
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
48
49
50
name: Lint
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
# Replace pull_request with pull_request_target if you
# plan to use this action with forks, see the Limitations section
pull_request:
branches:
- main
jobs:
run-linters:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["18"]
name: Run linters with Node ${{ matrix.node }}
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: Find yarn cache
id: yarn-cache-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Run ESLint
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
# Enable linters
eslint: true