Skip to content

Commit 17d6dda

Browse files
committed
chore: setup automated testing pipeline and ci/cd
- Installed Vitest, Supertest, and React Testing Library - Added mongodb-memory-server for isolated backend testing - Configured frontend jsdom environment - Wrote 27 backend tests verifying Auth, Community, and Report logic - Wrote 20 frontend component tests verifying UI validation, routing, and mock sockets - Created GitHub Actions workflow for automated CI/CD testing on push
1 parent cc271fb commit 17d6dda

19 files changed

Lines changed: 5200 additions & 810 deletions

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI Pipeline
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test-frontend:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: ./client
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.x'
22+
cache: 'npm'
23+
cache-dependency-path: './client/package-lock.json'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Run Tests
29+
run: npm run test
30+
31+
- name: Build
32+
run: npm run build
33+
34+
test-backend:
35+
runs-on: ubuntu-latest
36+
defaults:
37+
run:
38+
working-directory: ./server
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Use Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: '20.x'
46+
cache: 'npm'
47+
cache-dependency-path: './server/package-lock.json'
48+
49+
- name: Install dependencies
50+
run: npm ci
51+
52+
- name: Run Tests
53+
run: npm run test

0 commit comments

Comments
 (0)