Files
cloudlense/.github/workflows/backend.yml
T
Dennis 14a32bdc0d feat: initialize monorepo with full dev team best practices
- Unified monorepo with backend (Express), frontend (Next.js), and devops
- Backend: ESLint, Prettier, Jest tests (3 passing), health endpoint, .env.example
- Frontend: Fixed build errors, fixed all lint errors (0 remaining), tests passing
- DevOps: Docker Compose with PostgreSQL, backend, frontend + healthchecks
- CI/CD: 3 GitHub Actions workflows (backend, frontend, docker integration)
- DX: Husky pre-commit hooks with smart change detection
- Docs: Root README with architecture, CONTRIBUTING.md, PR template

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-06 00:05:50 +01:00

57 lines
1.2 KiB
YAML

name: Backend CI
on:
push:
branches: [main, develop]
paths:
- "website-monitoring-backend/**"
- ".github/workflows/backend.yml"
pull_request:
branches: [main]
paths:
- "website-monitoring-backend/**"
defaults:
run:
working-directory: website-monitoring-backend
jobs:
lint-test-build:
name: Lint, Test & Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: website-monitoring-backend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm test
env:
NODE_ENV: test
- name: Build
run: npm run build
- name: Upload coverage
if: matrix.node-version == 20
uses: actions/upload-artifact@v4
with:
name: backend-coverage
path: website-monitoring-backend/coverage/
retention-days: 7