Skip to content

Set up Jest testing environment and refactor test configurations #1

Set up Jest testing environment and refactor test configurations

Set up Jest testing environment and refactor test configurations #1

Workflow file for this run

# .github/workflows/ci.yml
name: CI/CD
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
REACT_APP_AUTH_URL=${{ secrets.REACT_APP_AUTH_URL }}
REACT_APP_COURSE_URL=${{ secrets.REACT_APP_COURSE_URL }}
PORT=${{ secrets.PORT }}
MONGODB_URI=${{ secrets.MONGODB_URI }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16 # Or your desired Node.js version
- name: Install server dependencies
run: cd server && npm install && cd ..
- name: Install client dependencies
run: cd client && npm install && cd ..
- name: Run server tests
run: npm test --prefix server
- name: Run client tests
run: npm test --prefix client
- name: Build Docker images
run: docker compose build