Skip to content

chore(deps-dev): update hatchling requirement from <1.22,>=1.21 to >=1.21,<1.30 #37

chore(deps-dev): update hatchling requirement from <1.22,>=1.21 to >=1.21,<1.30

chore(deps-dev): update hatchling requirement from <1.22,>=1.21 to >=1.21,<1.30 #37

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
proto-freshness:
name: Proto Stubs Freshness
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout proto repo
uses: actions/checkout@v4
with:
repository: AgentAnycast/agentanycast-proto
path: agentanycast-proto
- name: Verify stubs match proto source
run: |
# Compute checksum of all .proto source files.
PROTO_HASH=$(find agentanycast-proto/agentanycast/ -name '*.proto' -exec sha256sum {} \; | sort | sha256sum | cut -d' ' -f1)
echo "Proto source hash: $PROTO_HASH"
# Check if the committed checksum file matches.
if [ -f src/agentanycast/_generated/.proto-hash ]; then
COMMITTED_HASH=$(cat src/agentanycast/_generated/.proto-hash)
if [ "$PROTO_HASH" != "$COMMITTED_HASH" ]; then
echo "::error::Proto files have changed (hash $PROTO_HASH != committed $COMMITTED_HASH). Regenerate stubs: cd agentanycast-proto && buf generate, then copy gen/python/ to src/agentanycast/_generated/."
exit 1
fi
echo "Stubs are up to date."
else
echo "::warning::No .proto-hash file found. Creating one is recommended: run 'find agentanycast-proto/agentanycast/ -name *.proto -exec sha256sum {} \\; | sort | sha256sum | cut -d\" \" -f1 > src/agentanycast/_generated/.proto-hash'"
fi
lint:
name: Ruff Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Ruff check
run: ruff check .
- name: Ruff format check
run: ruff format --check .
type-check:
name: Mypy Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Mypy
run: mypy src/ --exclude '_generated'
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Run unit tests
run: pytest tests/ -v