Skip to content

Use startLine from API response for real line numbers in fetch artifacts #5

Use startLine from API response for real line numbers in fetch artifacts

Use startLine from API response for real line numbers in fetch artifacts #5

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
DOCKER_REGISTRY: ghcr.io
IMAGE_NAME: ghcr.io/codealive-ai/codealive-mcp
permissions:
contents: read
packages: write
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-asyncio pytest-mock pytest-cov jsonschema
- name: Run tests
run: |
python -m pytest src/tests/ -v --cov=src --cov-report=term-missing --cov-report=xml --junitxml=junit/test-results.xml
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: pytest-results
path: |
junit/test-results.xml
coverage.xml
docker:
name: Build & Push Docker
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# PR: build only (no push) to validate Dockerfile — single platform for speed
- name: Build Docker image (PR validation)
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
push: false
load: true
file: ./Dockerfile
tags: ${{ env.IMAGE_NAME }}:pr-${{ github.event.number }}
cache-from: type=gha
# Push to main: build multi-platform and push with rolling tags
- name: Build and push Docker image
if: github.event_name == 'push'
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
tags: ${{ env.IMAGE_NAME }}:main
labels: |
io.modelcontextprotocol.server.name=io.github.CodeAlive-AI/codealive-mcp
cache-from: type=gha
cache-to: type=gha