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