Skip to content

add convex_url

add convex_url #550

Workflow file for this run

name: Prettier and Build Check
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
prettier-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: |
# Clean npm cache
npm cache clean --force
# Remove lock files and node_modules to ensure fresh install
rm -rf package-lock.json node_modules
rm -rf client/package-lock.json client/node_modules
rm -rf server/package-lock.json server/node_modules
# Install all dependencies (root + client + server)
npm install --legacy-peer-deps
cd client && npm install --legacy-peer-deps && cd ..
cd server && npm install --legacy-peer-deps && cd ..
- name: Check Prettier formatting
run: |
if ! npx prettier --check .; then
echo "❌ Code is not properly formatted!"
echo ""
echo "To fix this, run:"
echo " npm run prettier-fix"
echo ""
echo "Then commit and push the changes."
exit 1
else
echo "✅ All files are properly formatted!"
fi
- name: Build project
run: |
echo "🏗️ Building project..."
npm run build
echo "✅ Build completed successfully!"
- name: Test production start
run: |
echo "🧪 Testing production start..."
timeout 3s npm start || EXIT_CODE=$?
if [ $EXIT_CODE -eq 124 ]; then
echo "✅ Production server started successfully (timed out as expected)"
exit 0
elif [ $EXIT_CODE -eq 0 ]; then
echo "✅ Production server started successfully"
exit 0
else
echo "❌ Production server failed to start with exit code $EXIT_CODE"
exit 1
fi