Skip to content
Merged
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
53 changes: 53 additions & 0 deletions .github/workflows/ci_fe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI for FE

on:
pull_request:
branches:
- main
paths:
- fe_repo/*

jobs:
"build-test-linter":
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./fe_repo

services:
docker:
image: docker:20.10.16
options: --privileged

steps:
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"

# Step 3: Install dependencies
- name: Install dependencies
run: |
npm install -g pnpm
pnpm i

# Step 4: Linter
- name: Check the linter
run: |
pnpm lint

# Step 5: Run Vite tests
- name: Run Vite tests
run: |
pnpm coverage

# Step 6: Build the project with Vite
- name: Build the project
run: |
pnpm build
8 changes: 4 additions & 4 deletions doc/CICD.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

### PR Build pipeline

- [ ] Install dependencise
- [ ] Build
- [ ] Linter
- [ ] Unit Tests
- [x] Install dependencise
- [x] Build
- [x] Linter
- [x] Unit Tests
- [ ] Security Check

### E2E tests pipeline (optional)
Expand Down
3 changes: 3 additions & 0 deletions fe_repo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Coverage
coverage
9 changes: 7 additions & 2 deletions fe_repo/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"name": "cv_coach",
"private": true,
"version": "0.0.0",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest",
"coverage": "vitest run --coverage",
"preview": "vite preview"
},
"dependencies": {
Expand All @@ -22,6 +25,7 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/coverage-v8": "2.1.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.9.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
Expand All @@ -31,6 +35,7 @@
"tailwindcss": "^3.4.12",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
"vite": "^5.4.1",
"vitest": "^2.1.2"
}
}
Loading
Loading