Files
cloudlense/.github/workflows/backend.yml
T
Dennis 50e25e3ee8 refactor: flatten monorepo structure to backend/ frontend/ devops/
Rename subdirectories for a cleaner single-repo layout:
- website-monitoring-backend/  → backend/
- website-monitoring-frontend/ → frontend/
- website-monitoring-devops/   → devops/

Update all references in package.json scripts, CI workflows,
docker-compose, pre-commit hooks, and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-07 00:25:29 +01:00

57 lines
1.1 KiB
YAML

name: Backend CI
on:
push:
branches: [main, develop]
paths:
- "backend/**"
- ".github/workflows/backend.yml"
pull_request:
branches: [main]
paths:
- "backend/**"
defaults:
run:
working-directory: 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: 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: backend/coverage/
retention-days: 7