Skip to content

Commit c349b4c

Browse files
committed
ci: add initial Github Action lint workflow
The eslint CI action has now been moved to a Github Action. The check also now adds annotations to PRs when eslint generates an error or warning. The eslint cache is now saved and reused which provides improved runtimes for the CI action.
1 parent 77336f7 commit c349b4c

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

.circleci/dynamic_config.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@ jobs:
181181
paths:
182182
- ~/.cache/yarn
183183

184-
lint:
185-
executor: action-executor
186-
steps:
187-
- custom_attach_workspace
188-
- run: yarn lint
189-
190184
validate:
191185
executor: action-executor
192186
steps:
@@ -386,9 +380,6 @@ workflows:
386380
jobs:
387381
# Linux jobs
388382
- setup
389-
- lint:
390-
requires:
391-
- setup
392383
- validate:
393384
requires:
394385
- setup

.github/workflows/lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
6+
# Declare default permissions as read only.
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
eslint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
16+
with:
17+
persist-credentials: false
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
21+
with:
22+
node-version-file: '.nvmrc'
23+
cache: yarn
24+
25+
- name: Install Dependencies
26+
run: yarn install --frozen-lockfile --ignore-scripts
27+
28+
- name: Setup ESLint Caching
29+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
30+
with:
31+
path: .eslintcache
32+
key: ${{ runner.os }}-${{ hashFiles('.eslintrc.json') }}-1
33+
34+
- name: Run ESLint
35+
run: yarn lint --cache-strategy content

0 commit comments

Comments
 (0)