Skip to content

removed jest as a type #108

removed jest as a type

removed jest as a type #108

Workflow file for this run

name: Node.js CI
on:
push:
workflow_dispatch: # Enables manual triggering from GitHub UI or CLI
jobs:
build:
name: Run Code formatting , type checking & tests, Project Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
working-directory: ./frontend
- name: Format code
run: npm run format:style
working-directory: ./frontend
- name: Run unit tests
run: npm run test
working-directory: ./frontend
- name: Build the project
run: npm run build --if-present
working-directory: ./frontend
- name: Install dependencies for backend
run: npm install
working-directory: ./backend
- name: Format code
run: npm run format:style
working-directory: ./backend
- name: Set up environment variables
run: |
echo "MONGO_CONNECTION_STRING=mockConnectionString" >> $GITHUB_ENV
echo "PORT=3000" >> $GITHUB_ENV
echo "SERVER_TOKEN_EXPIRETIME=3600" >> $GITHUB_ENV
echo "SERVER_TOKEN_ISSUER=mockIssuer" >> $GITHUB_ENV
echo "SERVER_TOKEN_SECRET=mockSecret" >> $GITHUB_ENV
echo "SERVER_HOSTNAME=mockHostname" >> $GITHUB_ENV
echo "RESEND_EMAIL_API_KEY=resendemailapikey" >> $GITHUB_ENV
echo "NODE_ENV=nodeenvironment" >> $GITHUB_ENV
echo "FRONTEND_BASE_URL=baseurl" >> $GITHUB_ENV
# - name: Run backend unit tests using jest framework
# run: npm run test
# working-directory: ./backend
- name: Build the project
run: npm run build
working-directory: ./backend