mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:41:09 +02:00
chore: replace all mana-core-auth references with mana-auth
Update docker-compose (dev + macmini), CI/CD workflows, Prometheus, package.json scripts, env generation, database setup, CODEOWNERS, and dependabot to reference the new Hono-based mana-auth service. Delete zombie mana-core-auth directory (already removed from Git). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e7bcb230be
commit
099a40bbd1
14 changed files with 70 additions and 97 deletions
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
|
@ -25,8 +25,7 @@ docker/caddy/Caddyfile.production @wuesteon
|
|||
# =============================================================================
|
||||
# Shared packages and services that affect all apps
|
||||
|
||||
services/mana-core-auth/ @wuesteon
|
||||
packages/shared-nestjs-auth/ @wuesteon
|
||||
services/mana-auth/ @wuesteon
|
||||
packages/shared-auth/ @wuesteon
|
||||
|
||||
# =============================================================================
|
||||
|
|
|
|||
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
|
|
@ -56,7 +56,7 @@ updates:
|
|||
|
||||
# Docker updates
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/services/mana-core-auth"
|
||||
directory: "/services/mana-auth"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
day: "monday"
|
||||
|
|
|
|||
10
.github/workflows/cd-macmini.yml
vendored
10
.github/workflows/cd-macmini.yml
vendored
|
|
@ -25,7 +25,7 @@ on:
|
|||
options:
|
||||
- all
|
||||
- matrix-web
|
||||
- mana-core-auth
|
||||
- mana-auth
|
||||
- chat-backend
|
||||
- chat-web
|
||||
- todo-backend
|
||||
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
if: github.event_name == 'push'
|
||||
outputs:
|
||||
matrix-web: ${{ steps.changes.outputs.matrix-web }}
|
||||
mana-core-auth: ${{ steps.changes.outputs.mana-core-auth }}
|
||||
mana-auth: ${{ steps.changes.outputs.mana-auth }}
|
||||
chat-backend: ${{ steps.changes.outputs.chat-backend }}
|
||||
chat-web: ${{ steps.changes.outputs.chat-web }}
|
||||
todo-backend: ${{ steps.changes.outputs.todo-backend }}
|
||||
|
|
@ -120,7 +120,7 @@ jobs:
|
|||
echo ""
|
||||
|
||||
check_changes "matrix-web" "apps/matrix/apps/web/" "apps/matrix/packages/"
|
||||
check_changes "mana-core-auth" "services/mana-core-auth/"
|
||||
check_changes "mana-auth" "services/mana-auth/"
|
||||
check_changes "chat-backend" "apps/chat/apps/backend/" "apps/chat/packages/"
|
||||
check_changes "chat-web" "apps/chat/apps/web/" "apps/chat/packages/"
|
||||
check_changes "todo-backend" "apps/todo/apps/backend/" "apps/todo/packages/"
|
||||
|
|
@ -140,7 +140,7 @@ jobs:
|
|||
|
||||
# Check if anything needs deploying
|
||||
ANY="false"
|
||||
for svc in matrix-web mana-core-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web mana-matrix-bot mana-landing-builder; do
|
||||
for svc in matrix-web mana-auth chat-backend chat-web todo-backend todo-web calendar-backend calendar-web clock-web contacts-backend contacts-web mukke-backend mukke-web storage-backend storage-web mana-matrix-bot mana-landing-builder; do
|
||||
val=$(grep "^$svc=" $GITHUB_OUTPUT | tail -1 | cut -d= -f2)
|
||||
if [ "$val" == "true" ]; then
|
||||
ANY="true"
|
||||
|
|
@ -202,7 +202,7 @@ jobs:
|
|||
else
|
||||
# Build list from detected changes
|
||||
if [ "${{ needs.detect-changes.outputs.matrix-web }}" == "true" ]; then SERVICES="$SERVICES matrix-web"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.mana-core-auth }}" == "true" ]; then SERVICES="$SERVICES mana-auth"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.mana-auth }}" == "true" ]; then SERVICES="$SERVICES mana-auth"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.chat-backend }}" == "true" ]; then SERVICES="$SERVICES chat-backend"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.chat-web }}" == "true" ]; then SERVICES="$SERVICES chat-web"; fi
|
||||
if [ "${{ needs.detect-changes.outputs.todo-backend }}" == "true" ]; then SERVICES="$SERVICES todo-backend"; fi
|
||||
|
|
|
|||
26
.github/workflows/ci.yml
vendored
26
.github/workflows/ci.yml
vendored
|
|
@ -49,7 +49,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||
outputs:
|
||||
mana-core-auth: ${{ steps.changes.outputs.mana-core-auth }}
|
||||
mana-auth: ${{ steps.changes.outputs.mana-auth }}
|
||||
mana-search: ${{ steps.changes.outputs.mana-search }}
|
||||
manacore-web: ${{ steps.changes.outputs.manacore-web }}
|
||||
chat-backend: ${{ steps.changes.outputs.chat-backend }}
|
||||
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
# Force build all if workflow_dispatch with force_build_all
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ inputs.force_build_all }}" == "true" ]; then
|
||||
echo "Force rebuild all services requested"
|
||||
echo "mana-core-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-search=true" >> $GITHUB_OUTPUT
|
||||
echo "manacore-web=true" >> $GITHUB_OUTPUT
|
||||
echo "chat-backend=true" >> $GITHUB_OUTPUT
|
||||
|
|
@ -119,7 +119,7 @@ jobs:
|
|||
else
|
||||
# workflow_dispatch without force - build all
|
||||
echo "Workflow dispatch without force_build_all - building all"
|
||||
echo "mana-core-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-search=true" >> $GITHUB_OUTPUT
|
||||
echo "manacore-web=true" >> $GITHUB_OUTPUT
|
||||
echo "chat-backend=true" >> $GITHUB_OUTPUT
|
||||
|
|
@ -171,12 +171,12 @@ jobs:
|
|||
echo "Shared UI changed: $SHARED_UI_CHANGED"
|
||||
echo "Shared web changed: $SHARED_WEB_CHANGED"
|
||||
|
||||
# mana-core-auth: services/mana-core-auth + packages/shared-nestjs-auth
|
||||
AUTH_CHANGED=$(check_pattern "services/mana-core-auth/|packages/shared-nestjs-auth/")
|
||||
# mana-auth: services/mana-auth
|
||||
AUTH_CHANGED=$(check_pattern "services/mana-auth/")
|
||||
if [ "$COMMON_CHANGED" == "true" ] || [ "$AUTH_CHANGED" == "true" ]; then
|
||||
echo "mana-core-auth=true" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "mana-core-auth=false" >> $GITHUB_OUTPUT
|
||||
echo "mana-auth=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# mana-search: services/mana-search
|
||||
|
|
@ -352,7 +352,7 @@ jobs:
|
|||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Service | Will Build |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "|---------|------------|" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| mana-core-auth | ${{ steps.changes.outputs.mana-core-auth }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| mana-auth | ${{ steps.changes.outputs.mana-auth }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| mana-search | ${{ steps.changes.outputs.mana-search }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| manacore-web | ${{ steps.changes.outputs.manacore-web }} |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| chat-backend | ${{ steps.changes.outputs.chat-backend }} |" >> $GITHUB_STEP_SUMMARY
|
||||
|
|
@ -440,11 +440,11 @@ jobs:
|
|||
# Build Docker images - only changed services
|
||||
# ===========================================
|
||||
|
||||
build-mana-core-auth:
|
||||
name: Build mana-core-auth
|
||||
build-mana-auth:
|
||||
name: Build mana-auth
|
||||
runs-on: ubuntu-latest
|
||||
needs: detect-changes
|
||||
if: needs.detect-changes.outputs.mana-core-auth == 'true'
|
||||
if: needs.detect-changes.outputs.mana-auth == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
|
|
@ -457,12 +457,12 @@ jobs:
|
|||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository_owner }}/mana-core-auth
|
||||
images: ghcr.io/${{ github.repository_owner }}/mana-auth
|
||||
tags: type=raw,value=latest
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: services/mana-core-auth/Dockerfile
|
||||
file: services/mana-auth/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
|
|
|||
42
.github/workflows/daily-tests.yml
vendored
42
.github/workflows/daily-tests.yml
vendored
|
|
@ -4,7 +4,7 @@
|
|||
# Manual Trigger: workflow_dispatch for on-demand test runs
|
||||
# Features:
|
||||
# - Integration tests (E2E flows)
|
||||
# - mana-core-auth service tests with coverage
|
||||
# - mana-auth service tests with coverage
|
||||
# - Database setup/teardown
|
||||
# - Discord notifications (always sent on success or failure)
|
||||
|
||||
|
|
@ -38,9 +38,9 @@ env:
|
|||
COVERAGE_THRESHOLD: ${{ github.event.inputs.coverage_threshold || '80' }}
|
||||
|
||||
jobs:
|
||||
# Job 1: Test mana-core-auth with coverage
|
||||
test-mana-core-auth:
|
||||
name: Test mana-core-auth
|
||||
# Job 1: Test mana-auth with coverage
|
||||
test-mana-auth:
|
||||
name: Test mana-auth
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
|
|
@ -90,13 +90,13 @@ jobs:
|
|||
run: pnpm run build:packages
|
||||
|
||||
- name: Setup test database
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
env:
|
||||
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
|
||||
run: pnpm run db:migrate
|
||||
|
||||
- name: Run tests with coverage
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
env:
|
||||
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
|
||||
REDIS_URL: redis://localhost:6379
|
||||
|
|
@ -114,16 +114,16 @@ jobs:
|
|||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverage-mana-core-auth
|
||||
path: services/mana-core-auth/coverage
|
||||
name: coverage-mana-auth
|
||||
path: services/mana-auth/coverage
|
||||
retention-days: 30
|
||||
|
||||
- name: Check coverage threshold
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
run: |
|
||||
if [ -f "coverage/coverage-summary.json" ]; then
|
||||
COVERAGE=$(node -e "const c = require('./coverage/coverage-summary.json'); console.log(c.total.lines.pct)")
|
||||
echo "Coverage for mana-core-auth: ${COVERAGE}%"
|
||||
echo "Coverage for mana-auth: ${COVERAGE}%"
|
||||
|
||||
if (( $(echo "$COVERAGE < $COVERAGE_THRESHOLD" | bc -l) )); then
|
||||
echo "::error::Coverage ${COVERAGE}% is below threshold ${COVERAGE_THRESHOLD}%"
|
||||
|
|
@ -183,7 +183,7 @@ jobs:
|
|||
run: pnpm run build:packages
|
||||
|
||||
- name: Setup databases for integration tests
|
||||
working-directory: services/mana-core-auth
|
||||
working-directory: services/mana-auth
|
||||
env:
|
||||
DATABASE_URL: postgresql://manacore:testpassword@localhost:5432/manacore
|
||||
run: pnpm run db:migrate
|
||||
|
|
@ -197,7 +197,7 @@ jobs:
|
|||
JWT_AUDIENCE: manacore
|
||||
run: |
|
||||
# Run auth integration tests
|
||||
cd services/mana-core-auth
|
||||
cd services/mana-auth
|
||||
if [ -d "test/integration" ]; then
|
||||
pnpm run test:e2e || pnpm run test -- test/integration
|
||||
fi
|
||||
|
|
@ -207,13 +207,13 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: integration-test-results
|
||||
path: services/mana-core-auth/test-results
|
||||
path: services/mana-auth/test-results
|
||||
retention-days: 30
|
||||
|
||||
# Job 3: Always send Discord notification (success or failure)
|
||||
notify:
|
||||
name: Discord Notification
|
||||
needs: [test-mana-core-auth, test-integration]
|
||||
needs: [test-mana-auth, test-integration]
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
@ -224,15 +224,15 @@ jobs:
|
|||
- name: Download coverage summary
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: coverage-mana-core-auth
|
||||
path: coverage-mana-core-auth
|
||||
name: coverage-mana-auth
|
||||
path: coverage-mana-auth
|
||||
continue-on-error: true
|
||||
|
||||
- name: Check test results
|
||||
id: check
|
||||
run: |
|
||||
# Check if both jobs succeeded
|
||||
AUTH_STATUS="${{ needs.test-mana-core-auth.result }}"
|
||||
AUTH_STATUS="${{ needs.test-mana-auth.result }}"
|
||||
INTEGRATION_STATUS="${{ needs.test-integration.result }}"
|
||||
|
||||
if [ "$AUTH_STATUS" = "success" ] && [ "$INTEGRATION_STATUS" = "success" ]; then
|
||||
|
|
@ -249,8 +249,8 @@ jobs:
|
|||
echo "run_url=$RUN_URL" >> $GITHUB_OUTPUT
|
||||
|
||||
# Get coverage if available
|
||||
if [ -f "coverage-mana-core-auth/coverage-summary.json" ]; then
|
||||
COVERAGE=$(node -e "const c = require('./coverage-mana-core-auth/coverage-summary.json'); console.log(c.total.lines.pct)")
|
||||
if [ -f "coverage-mana-auth/coverage-summary.json" ]; then
|
||||
COVERAGE=$(node -e "const c = require('./coverage-mana-auth/coverage-summary.json'); console.log(c.total.lines.pct)")
|
||||
echo "coverage=${COVERAGE}%" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "coverage=N/A" >> $GITHUB_OUTPUT
|
||||
|
|
@ -296,8 +296,8 @@ jobs:
|
|||
\"inline\": true
|
||||
},
|
||||
{
|
||||
\"name\": \"🧪 mana-core-auth\",
|
||||
\"value\": \"${{ needs.test-mana-core-auth.result }}\",
|
||||
\"name\": \"🧪 mana-auth\",
|
||||
\"value\": \"${{ needs.test-mana-auth.result }}\",
|
||||
\"inline\": true
|
||||
},
|
||||
{
|
||||
|
|
|
|||
6
.github/workflows/docker-validate.yml
vendored
6
.github/workflows/docker-validate.yml
vendored
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
# Job 2: Build representative Docker images
|
||||
# ===========================================
|
||||
# Builds a subset that covers all shared packages:
|
||||
# - mana-core-auth: covers shared-storage, shared-nestjs-auth, shared-llm
|
||||
# - mana-auth: covers auth service (Hono + Bun)
|
||||
# - todo-web: covers most shared-* web packages
|
||||
# - zitare-web: covers content packages, shared-pwa
|
||||
# - calendar-web: covers calendar shared packages
|
||||
|
|
@ -97,8 +97,8 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- service: mana-core-auth
|
||||
dockerfile: services/mana-core-auth/Dockerfile
|
||||
- service: mana-auth
|
||||
dockerfile: services/mana-auth/Dockerfile
|
||||
context: .
|
||||
- service: todo-backend
|
||||
dockerfile: apps/todo/apps/backend/Dockerfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue