Skip to content

Commit f8d2caf

Browse files
authored
Add frontend linting to CI (#643)
1 parent a21416e commit f8d2caf

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ env:
77

88
jobs:
99

10+
11+
1012
## BUILD JOBS
1113
build:
1214
strategy:

.github/workflows/linting.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Frontend linting
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
linting:
7+
runs-on: ubuntu-20.04
8+
defaults:
9+
run:
10+
working-directory: ./webgui-new/
11+
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v3
15+
16+
- name: setup Node.JS
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 20
20+
cache: 'npm'
21+
cache-dependency-path: ./webgui-new/package-lock.json
22+
23+
- name: cache node modules
24+
id: cache_node_modules
25+
uses: actions/cache@v3
26+
with:
27+
path: ./webgui-new/node_modules
28+
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-npm-
31+
32+
- name: install npm
33+
if: steps.cache_node_modules.outputs.cache-hit != 'true'
34+
run: npm install
35+
36+
- name: run linter
37+
run: npm run lint
38+
39+
40+

0 commit comments

Comments
 (0)