Skip to content

Commit 749ebfa

Browse files
committed
Update workflow
1 parent c0ec700 commit 749ebfa

File tree

1 file changed

+38
-7
lines changed

1 file changed

+38
-7
lines changed

.github/workflows/lint.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
11
name: Lint
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
env:
12+
NODE_VERSION: 20
413

514
jobs:
6-
lint:
7-
name: Lint
15+
question-service:
16+
runs-on: ubuntu-latest
17+
name: Question service
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
- name: Setting node version
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ env.NODE_VERSION }}
25+
- name: Install dependences
26+
working-directory: ./backend/question-service
27+
run: npm install
28+
- name: Run eslint
29+
working-directory: ./backend/question-service
30+
run: npm run lint
31+
frontend:
832
runs-on: ubuntu-latest
33+
name: Frontend
934
steps:
1035
- name: Checkout code
1136
uses: actions/checkout@v4
12-
- name: Lint question service
13-
run: cd backend/question-service && npm install && npm run lint
14-
- name: Lint frontend
15-
run: cd frontend && npm install && npm run lint
37+
- name: Setting node version
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: ${{ env.NODE_VERSION }}
41+
- name: Install dependencies
42+
working-directory: ./frontend
43+
run: npm install
44+
- name: Run eslint
45+
working-directory: ./frontend
46+
run: npm run lint

0 commit comments

Comments
 (0)