Skip to content

feat: manage custom roles from admin UI #12

feat: manage custom roles from admin UI

feat: manage custom roles from admin UI #12

Workflow file for this run

name: Continuous integration
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
backend:
name: Backend tests and migration validation
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
env:
APP_NAME: AegisAI
APP_VERSION: ci
APP_ENV: ci
HOST: 0.0.0.0
PORT: "8000"
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/aegis
QDRANT_URL: http://qdrant:6333
JWT_SECRET_KEY: ci-only-not-a-production-secret
JWT_ALGORITHM: HS256
ACCESS_TOKEN_EXPIRE_MINUTES: "15"
REFRESH_TOKEN_EXPIRE_DAYS: "7"
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: backend/requirements.txt
- name: Install backend dependencies
run: python -m pip install -r requirements.txt
- name: Run backend unit tests
run: python -m unittest discover -s tests -v
- name: Validate Alembic migration chain
run: alembic upgrade head --sql > /tmp/alembic-upgrade.sql
frontend:
name: Frontend type, test, and production build
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: "24"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
run: npm ci
- name: Run frontend type checks
run: npm run typecheck
- name: Run frontend tests
run: npm test
- name: Build frontend production bundle
run: npm run build
compose:
name: Compose image and migration gates
runs-on: ubuntu-latest
needs: [backend, frontend]
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Prepare CI-only Compose configuration
run: cp backend/.env.example backend/.env
- name: Validate Compose configuration
run: docker compose config --quiet
- name: Build backend and frontend images
run: docker compose build --pull backend frontend
kubernetes:
name: Kubernetes manifest rendering
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v6
- name: Set up kubectl with Kustomize
uses: azure/setup-kubectl@v4
with:
version: v1.32.3
- name: Render Kubernetes bases and production deployment stages
run: |
kubectl kustomize infrastructure/kubernetes/base > /tmp/aegisai-base.yaml
kubectl kustomize infrastructure/kubernetes/overlays/production/platform > /tmp/aegisai-platform.yaml
kubectl kustomize infrastructure/kubernetes/overlays/production/migration > /tmp/aegisai-migration.yaml
kubectl kustomize infrastructure/kubernetes/overlays/production/application > /tmp/aegisai-application.yaml