made fields simular #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Frontend CI | |
on: pull_request | |
jobs: | |
frontend-tests: | |
runs-on: ubuntu-latest | |
services: | |
mongodb: | |
image: mongo:latest | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js for Frontend | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 19 | |
- name: Run MongoDB and Wait for Healthy State | |
run: sleep 10 # Wait for MongoDB container to initialize (adjust timing if needed) | |
- name: "Start backend" | |
env: | |
JWT_SECRET: LJKHGHJYT78CV8676XCYHN | |
run: | | |
cd ./api && | |
npm install && | |
npm run dev & | |
sleep 10 | |
- name: "Start Frontend" | |
run: | | |
cd ./frontend && | |
npm install && | |
npm run dev & | |
sleep 10 | |
- name: "Run unit tests" | |
working-directory: ./frontend | |
run: npm run unit:once | |
- name: "Run e2e tests" | |
working-directory: ./frontend | |
run: npm run e2e:headless |