Skip to content

Commit bbf831c

Browse files
authored
Merge pull request #39 from JhaSourav07/chore/setup-testing-pipeline
docs: update contribution guidelines to reflect Node.js v22 requireme…
2 parents a43fbfe + 765d753 commit bbf831c

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
5. [Contribution Workflow](#5-contribution-workflow)
1414
6. [Commit Message Format](#6-commit-message-format)
1515
7. [Code Quality & Linting](#7-code-quality--linting)
16-
8. [Submitting a Pull Request](#8-submitting-a-pull-request)
17-
9. [Getting Help](#9-getting-help)
16+
8. [Testing & CI/CD](#8-testing--cicd)
17+
9. [Submitting a Pull Request](#9-submitting-a-pull-request)
18+
10. [Getting Help](#10-getting-help)
1819

1920
---
2021

@@ -24,7 +25,7 @@ Before you begin, make sure you have the following installed on your machine:
2425

2526
| Tool | Recommended Version | Download |
2627
|------|---------------------|----------|
27-
| **Node.js** | `v18+` (LTS) | [nodejs.org](https://nodejs.org) |
28+
| **Node.js** | `v22+` (LTS) | [nodejs.org](https://nodejs.org) |
2829
| **npm** | Comes with Node.js | — |
2930
| **Git** | Any recent version | [git-scm.com](https://git-scm.com) |
3031

@@ -306,7 +307,27 @@ Fix all errors before pushing. PRs with lint errors will not be merged.
306307

307308
---
308309

309-
## 8. Submitting a Pull Request
310+
## 8. Testing & CI/CD
311+
312+
We rely on **Vitest** for lightning-fast, lightweight unit and integration testing.
313+
314+
To keep the development environment accessible to all students and contributors, we intentionally **do not** use heavy browser testing frameworks (like Playwright or Cypress). This ensures you won't have to download massive browser binaries just to contribute.
315+
316+
### Running Tests Locally
317+
318+
Before opening a Pull Request, you **must** run the test suite locally to ensure your changes don't break the core PDF logic:
319+
320+
```bash
321+
npm run test
322+
```
323+
324+
### The CI/CD Gatekeeper
325+
326+
We use a GitHub Actions pipeline that acts as an automated gatekeeper. **Any Pull Request that fails linting (`npm run lint`) or unit tests (`npm run test`) will be automatically blocked.** Please save everyone time by verifying your code locally first!
327+
328+
---
329+
330+
## 9. Submitting a Pull Request
310331

311332
When you open a PR, please:
312333

@@ -327,6 +348,7 @@ Before clicking "Create Pull Request", verify:
327348
- [ ] My branch is up to date with `upstream/main`
328349
- [ ] `npm run dev` runs without errors
329350
- [ ] `npm run lint` passes with zero errors
351+
- [ ] `npm run test` passes with all tests green
330352
- [ ] I have not removed any `eslint-disable` comments
331353
- [ ] No PDF data is sent to any external server or API
332354
- [ ] My UI changes match the existing dark glassmorphism design
@@ -336,7 +358,7 @@ Before clicking "Create Pull Request", verify:
336358

337359
---
338360

339-
## 9. Getting Help
361+
## 10. Getting Help
340362

341363
Stuck? Have a question? Here's how to get support:
342364

0 commit comments

Comments
 (0)