mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
mana-search-go → mana-search mana-notify-go → mana-notify mana-crawler-go → mana-crawler mana-api-gateway-go → mana-api-gateway Legacy NestJS versions are deleted, suffix no longer needed. Updated all references in docker-compose, CLAUDE.md, package.json, Forgejo workflows, and service package.json files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
79 lines
2 KiB
YAML
79 lines
2 KiB
YAML
# CI for Go Services
|
|
# Runs on push to main or PRs — builds and tests all Go services
|
|
# Compatible with both Forgejo Actions and GitHub Actions
|
|
|
|
name: Go Services CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'services/mana-search/**'
|
|
- 'services/mana-notify/**'
|
|
- 'services/mana-crawler/**'
|
|
- 'services/mana-api-gateway/**'
|
|
- 'services/mana-sync/**'
|
|
- 'services/mana-matrix-bot/**'
|
|
pull_request:
|
|
paths:
|
|
- 'services/mana-search/**'
|
|
- 'services/mana-notify/**'
|
|
- 'services/mana-crawler/**'
|
|
- 'services/mana-api-gateway/**'
|
|
- 'services/mana-sync/**'
|
|
- 'services/mana-matrix-bot/**'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
service:
|
|
- mana-search
|
|
- mana-notify
|
|
- mana-crawler
|
|
- mana-api-gateway
|
|
- mana-sync
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25'
|
|
|
|
- name: Test ${{ matrix.service }}
|
|
run: |
|
|
cd services/${{ matrix.service }}
|
|
go vet ./...
|
|
go test ./... -v -count=1
|
|
|
|
- name: Build ${{ matrix.service }}
|
|
run: |
|
|
cd services/${{ matrix.service }}
|
|
CGO_ENABLED=0 go build -ldflags="-s -w" -o /dev/null ./cmd/server
|
|
|
|
docker:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- service: mana-search
|
|
image: mana-search
|
|
- service: mana-notify
|
|
image: mana-notify
|
|
- service: mana-crawler
|
|
image: mana-crawler
|
|
- service: mana-api-gateway
|
|
image: mana-api-gateway
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
docker build \
|
|
-f services/${{ matrix.service }}/Dockerfile \
|
|
-t ${{ matrix.image }}:${{ github.sha }} \
|
|
-t ${{ matrix.image }}:latest \
|
|
.
|