Skip to content

added prettier to package #21

added prettier to package

added prettier to package #21

name: Run Frontend Tests
on:
pull_request:
branches:
- main
jobs:
frontend-test:
name: Frontend Test
runs-on: ubuntu-latest
environment: main
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_USER: ${{ secrets.DB_USER }}
DB_USER_PASS: ${{ secrets.DB_USER_PASS }}
DB_PASS: ${{ secrets.DB_PASS }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
PORT: ${{ secrets.PORT }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
steps:
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Node.js (no need to set working-directory here)
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Specify your Node.js version
# Step 3: Install dependencies (in the frontend folder)
- name: Install dependencies
working-directory: ./frontend # Change to frontend folder
run: npm install
# Step 4: Run tests (in the frontend folder)
- name: Run Jest tests
working-directory: ./frontend # Change to frontend folder
run: npm test
env:
CI: true # Ensures proper output in CI environments