Skip to content

Commit 66b5e0a

Browse files
authored
Create linter.yml
1 parent a3dc5e1 commit 66b5e0a

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/linter.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Lint Codebase
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Checkout the code from the repository
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
20+
# Set up Node.js
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '18'
25+
26+
# Cache npm modules
27+
- name: Cache node modules
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-
34+
35+
# Install dependencies
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
# Run the linter
40+
- name: Run linter
41+
run: npm run lint

0 commit comments

Comments
 (0)