Skip to content

Commit c5ddc69

Browse files
authored
Init GitHub Action to validate code before merging (#3)
1 parent f24caf3 commit c5ddc69

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
types: [opened, synchronize, reopened]
9+
workflow_dispatch:
10+
11+
jobs:
12+
lint-and-build:
13+
name: Lint and Build
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Setup pnpm
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: 8
29+
30+
- name: Install dependencies
31+
run: pnpm install --no-frozen-lockfile
32+
33+
- name: Run ESLint
34+
run: pnpm run lint
35+
36+
- name: Build project
37+
run: pnpm run build

0 commit comments

Comments
 (0)