-
-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (52 loc) · 1.4 KB
/
linter.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Linter
on:
push:
branches-ignore:
- automated/*
- renovate/*
pull_request:
branches:
- main
workflow_dispatch: {}
permissions:
contents: read
jobs:
linter:
name: linter on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
arch: x64
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Get npm cache directory
run: echo "npm_cache_dir=$(npm config get cache)" >> ${GITHUB_ENV}
- name: Use npm cache
uses: actions/cache@v4
with:
path: ${{ env.npm_cache_dir }}
key: ${{ matrix.os }}-${{ matrix.arch }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.arch }}-node-
- name: Install npm dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 20
max_attempts: 3
retry_on: any
command: npm ci
- name: Lint
run: npm run lint
- name: Verify Publish Configurations
run: ./scripts/lint-publish-configs.sh
- name: Verify No Duplicate Dependencies
run: ./scripts/lint-package-dependencies.sh