Skip to content

Add GitHub Actions for automated Railway deployment #1

Add GitHub Actions for automated Railway deployment

Add GitHub Actions for automated Railway deployment #1

Workflow file for this run

name: CI Tests
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build TypeScript
run: npm run build
- name: Check for TypeScript errors
run: npx tsc --noEmit
- name: Lint code
run: |
if [ -f .eslintrc.js ] || [ -f .eslintrc.json ]; then
npm run lint --if-present
else
echo "No ESLint config found, skipping lint"
fi
- name: Run tests
run: npm test --if-present
- name: Build success notification
if: success()
run: |
echo "✅ Build and tests passed!"
echo "📦 TypeScript compiled successfully"
echo "🔍 No lint errors found"