Skip to content

Added session context to graph and dashboard md #17

Added session context to graph and dashboard md

Added session context to graph and dashboard md #17

Workflow file for this run

name: Release
on:
push:
branches: [main, master]
tags: ['v*']
pull_request:
branches: [main, master]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
permissions:
contents: read
packages: write
jobs:
test:
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:5.15-community
env:
NEO4J_AUTH: neo4j/testpassword
NEO4J_PLUGINS: '["apoc"]'
ports:
- 7687:7687
- 7474:7474
options: >-
--health-cmd "wget -q --spider http://localhost:7474 || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install dependencies
working-directory: mcp-server
run: uv pip install --system -e ".[dev]"
- name: Run unit tests
working-directory: mcp-server
run: pytest ../tests/unit -v -m unit
- name: Run integration tests
working-directory: mcp-server
env:
CCMEMORY_NEO4J_URI: bolt://localhost:7687
CCMEMORY_NEO4J_PASSWORD: testpassword
run: pytest ../tests/integration -v -m integration
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push for CI
uses: docker/build-push-action@v6
with:
context: ./mcp-server
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ci-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILDKIT_INLINE_CACHE=1
release-docker:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: [test, build-docker]
steps:
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull and tag for release
run: |
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ci-${{ github.sha }}
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ci-${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:ci-${{ github.sha }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
cleanup:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: release-docker
steps:
- name: Delete old package versions
uses: actions/delete-package-versions@v5
with:
package-name: ccmemory
package-type: container
min-versions-to-keep: 5
delete-only-untagged-versions: true