Skip to content

Commit c4b87bd

Browse files
committed
added ci to check for build step
Signed-off-by: Sayan Banerjee <[email protected]>
1 parent 31efe77 commit c4b87bd

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/build.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build Check
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build-check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Install Node.js
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 20
18+
cache: "npm"
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Run Frontend Build
24+
run: npm run build -w frontend || (echo "Frontend build failed!" && exit 1)
25+
26+
- name: Run Backend Build
27+
run: npm run build -w backend || (echo "Backend build failed!" && exit 1)

.github/workflows/formatting.yml

+21
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,24 @@ jobs:
2222

2323
- name: Run Prettier Check
2424
run: npm run format:check || (echo "Code is not formatted! Run 'npm run format' locally." && exit 1)
25+
26+
build-check:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
32+
- name: Install Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
cache: "npm"
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Run Frontend Build
42+
run: npm run build:frontend || (echo "Frontend build failed!" && exit 1)
43+
44+
- name: Run Backend Build
45+
run: npm run build:backend || (echo "Backend build failed!" && exit 1)

0 commit comments

Comments
 (0)