Skip to content

Commit

Permalink
feat: remove vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
SAINIAbhishek committed Nov 20, 2024
1 parent 7e95639 commit f6de846
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 125 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
cache-key-prefix: "server"
working-directory: "./server"

# Step: Lint the Frontnend code
# Step: Lint the Frontend code
lint-frontend:
needs: [npm-frontend] # Wait for dependencies to be installed before linting
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,8 +86,8 @@ jobs:
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/package-lock.json') }}

# Format the frontend code with Prettier
- name: Check Frontend Code Formatting with Prettier
run: npm run prettier
- name: Frontend Code Formatting with Prettier
run: npm run format
working-directory: ./frontend

# Step: Security audit Frontend
Expand All @@ -112,31 +112,9 @@ jobs:
cache-key-prefix: "server"
working-directory: "./server"

# Step: Run unit tests
test-frontend:
needs: [lint-frontend, format-frontend]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

# Restore Frontend Node.js Modules cache
- name: Restore Frontend Node.js Modules Cache
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/package-lock.json') }}

# Run frontend unit tests
- name: Run Frontend Unit Tests
run: npm run test:coverage
working-directory: ./frontend
env:
CI: true # Ensures Vitest runs in Continuous Integration mode

# Step: Build the Frontend project
build-frontend:
needs: test-frontend
needs: [lint-frontend, format-frontend]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ The application uses the Context API and Hooks for effective state management.
- Eslint
- Prettier
- React i18next
- Testing with Vitest & React Testing Library
- Docker image ([Frontend Image](https://hub.docker.com/r/sainiabhishek/fullstack_task-frontend))

### How to Setup the Frontend
Expand Down
Loading

0 comments on commit f6de846

Please sign in to comment.