Skip to content

Add comprehensive test scripts for registration features #186

Add comprehensive test scripts for registration features

Add comprehensive test scripts for registration features #186

name: Build and Test CodeRush Frontend
on:
# Run on pushes to any branch
push:
branches:
- "**"
# Run on pull requests targeting any branch
pull_request:
branches:
- "**"
jobs:
Build-Test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# This step caches npm dependencies and sets up Node.js
- name: Set up Node.js with dependency caching
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: package-lock.json
# This step specifically caches the Next.js build output
- name: Cache Next.js build
uses: actions/cache@v4
with:
path: ./.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('package-lock.json') }}-
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint
- name: Run Build Command
run: npm run build
env:
# Add any environment variables needed for your CodeRush project
# For example, if you have API keys or other secrets:
# NEXT_PUBLIC_API_URL: ${{ secrets.API_URL }}
# DATABASE_URL: ${{ secrets.DATABASE_URL }}
NODE_ENV: production