Skip to content

fix(ci): use GitHub App token for semantic-release #49

fix(ci): use GitHub App token for semantic-release

fix(ci): use GitHub App token for semantic-release #49

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
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
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Cache virtual environment
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
venv-${{ runner.os }}-
- name: Create virtual environment
run: uv venv --allow-existing
- name: Install dependencies
run: uv pip install -e ".[dev]"
- name: Prune uv cache for CI
run: uv cache prune --ci
- name: Set up test cluster config
run: |
mkdir -p ~/.config/acp
cp clusters.yaml.example ~/.config/acp/clusters.yaml
- name: Run ruff (autofix, then verify)
run: |
uv run ruff check --fix .
uv run ruff format .
git diff --exit-code || (echo "ruff made changes — commit them locally before pushing" && exit 1)
# TODO: Enable mypy once type annotations are complete
# - name: Run mypy (type checking)
# run: uv run mypy src/mcp_acp
- name: Run tests with coverage
run: uv run pytest tests/ --cov=src/mcp_acp --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false