Skip to content

Commit 7e7243b

Browse files
authored
Merge pull request #5 from OsamaRab3/workflow
Add GitHub Actions CI/CD pipeline
2 parents be33b65 + c4ec490 commit 7e7243b

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/push.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
env:
11+
NODE_VERSION: '20.x'
12+
PNPM_VERSION: '10.x'
13+
14+
jobs:
15+
test-and-build:
16+
name: Test and Build
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
cache: 'pnpm'
28+
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v2
31+
with:
32+
version: ${{ env.PNPM_VERSION }}
33+
34+
- name: Install dependencies
35+
run: pnpm install
36+
- name: Build
37+
run: pnpm run build
38+
39+
- name: Run unit tests
40+
run: pnpm run test
41+
42+
# - name: Run e2e tests
43+
# run: pnpm run test:e2e
44+
# - name: Lint
45+
# run: pnpm run lint
46+
47+

0 commit comments

Comments
 (0)