Skip to content

Bump eslint-plugin-react-hooks from 5.2.0 to 7.0.1 in /frontend #13

Bump eslint-plugin-react-hooks from 5.2.0 to 7.0.1 in /frontend

Bump eslint-plugin-react-hooks from 5.2.0 to 7.0.1 in /frontend #13

Workflow file for this run

name: Codenames CI/CD Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# JOB 1: Test the Backend
build-backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend # Tell GitHub to look inside 'backend' folder
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: backend/package-lock.json
- name: Install Dependencies
run: npm ci # 'ci' is faster and cleaner than 'install' for pipelines
# This is the "Gatekeeper". If your code has syntax errors, this fails.
- name: Check for Syntax Errors (Dry Run)
run: node --check server.js
# JOB 2: Test the Frontend
build-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install Dependencies
run: npm ci
- name: Lint Code
run: npm run lint
- name: Verify Build
run: npm run build # If React fails to build, the pipeline stops here.
# JOB 3: Deploy to Render (Only if Job 1 passes)
deploy-backend:
needs: [build-backend] # Wait for backend tests to pass
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # Only deploy if we are on the main branch
steps:
- name: Trigger Render Deployment
run: curl "${{ secrets.RENDER_DEPLOY_HOOK }}"