Add complete NexaFabric project structure including: - FastAPI backend with SQLAlchemy models, JWT auth, RBAC, audit logging, and provider interfaces - React + TypeScript frontend with Vite, Tailwind CSS, TanStack Query, and Zustand - Docker Compose configuration for PostgreSQL, Redis, API, worker, frontend, and nginx - GitHub Actions and GitLab CI workflows for testing, linting, building, and security scanning - Environment
51 lines
927 B
YAML
51 lines
927 B
YAML
stages:
|
|
- test
|
|
- build
|
|
- security
|
|
- release
|
|
|
|
backend:
|
|
image: python:3.12-slim
|
|
stage: test
|
|
script:
|
|
- cd backend
|
|
- pip install ".[dev]"
|
|
- ruff check .
|
|
- pytest
|
|
|
|
frontend:
|
|
image: node:22-alpine
|
|
stage: test
|
|
script:
|
|
- cd frontend
|
|
- npm install
|
|
- npm test
|
|
- npm run build
|
|
|
|
docker-build:
|
|
image: docker:27
|
|
stage: build
|
|
services:
|
|
- docker:27-dind
|
|
script:
|
|
- docker build -t nexafabric-api:$CI_COMMIT_SHA backend
|
|
- docker build -t nexafabric-frontend:$CI_COMMIT_SHA frontend
|
|
|
|
security-scan:
|
|
image: aquasec/trivy:latest
|
|
stage: security
|
|
script:
|
|
- trivy fs --exit-code 0 --severity HIGH,CRITICAL .
|
|
|
|
openapi:
|
|
image: python:3.12-slim
|
|
stage: release
|
|
script:
|
|
- cd backend
|
|
- pip install ".[dev]"
|
|
- python -c "import json; from app.main import app; print(json.dumps(app.openapi()))" > ../openapi.json
|
|
artifacts:
|
|
paths:
|
|
- openapi.json
|
|
|