-
Notifications
You must be signed in to change notification settings - Fork 23
77 lines (68 loc) · 1.97 KB
/
lint-files.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Lint Files
on:
push:
paths:
- '**.cjs'
- '**.js'
- '**.ts'
- '**.tsx'
- '.eslint*'
- '.nvmrc'
- '.prettier*'
branches:
- main
- release/*
pull_request:
paths:
- '**.cjs'
- '**.js'
- '**.ts'
- '**.tsx'
- '.eslint*'
- '.nvmrc'
- '.prettier*'
# Cancels all prior workflow runs associated with pull requests that are still in progress.
concurrency:
# The concurrency group contains the workflow name and the (target) branch name.
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint
# Change ubuntu version as the latest ubuntu is unable to run for some reason. Change it back to latest when its fixed.
runs-on: ubuntu-20.04
permissions:
contents: read # For actions/checkout to fetch code
timeout-minutes: 20
steps:
- name: Harden Runner # Security agent: blocks outbound traffic & detects code overwrite to prevent breaches
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6
with:
disable-sudo: true
disable-file-monitoring: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
registry.npmjs.org:443
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Setup Node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version-file: '.nvmrc'
cache: npm
- name: Install dependencies
run: npm ci
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: JS Lint
run: npm run lint:js
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Type Checks
run: npm run lint:types
env:
NODE_OPTIONS: --max-old-space-size=4096