Skip to content
Merged

Mt #2

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## 📝 Description
<!-- Mô tả ngắn gọn về thay đổi -->

## 🔗 Related Issue
<!-- Link đến issue liên quan (nếu có) -->
Closes #

## 🎯 Type of Change
- [ ] 🐛 Bug fix
- [ ] ✨ New feature
- [ ] 🔨 Refactoring
- [ ] 📦 library update
- [ ] 📝 Documentation
- [ ] 🎨 UI/UX

## ✅ Checklist
- [ ] Code đã được test locally
- [ ] Không có lỗi lint
- [ ] Đã cập nhật documentation (nếu cần)

## 📸 Screenshots (nếu có)
<!-- Thêm screenshots nếu có thay đổi UI -->
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

jobs:
lint-and-typecheck:
name: Lint & Type Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Type check
run: npm run type-check

test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

build:
name: Build
runs-on: ubuntu-latest
needs: [lint-and-typecheck, test]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build application
run: npm run build
env:
NODE_ENV: production

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: .next
retention-days: 7
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fund=false
audit=false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Security Vulnerability: Disabling npm audit prevents detection of known security vulnerabilities in dependencies.1

Remove audit=false to enable automatic vulnerability scanning during npm install.

Suggested change
audit=false
fund=false

Footnotes

  1. CWE-1395: Dependency on Vulnerable Third-Party Component - https://cwe.mitre.org/data/definitions/1395.html

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.13.0
Loading
Loading