claw-code/.guardrails/.github/workflows/team-validation.yml

109 lines
2.4 KiB
YAML

name: Team Validation
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
validate-teams:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Validate team sizes
run: |
python3 scripts/team_manager.py --project example validate-size
- name: Check team status
run: |
python3 scripts/team_manager.py --project example status
- name: Export team configuration
if: github.ref == 'refs/heads/main'
run: |
python3 scripts/team_manager.py --project example export-json --file teams-export.json
- name: Upload team export
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: teams-export
path: teams-export.json
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run Python tests
run: |
pytest scripts/ -v --cov=scripts --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
test-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Run Go tests
run: |
cd mcp-server
go test ./... -v -race
- name: Build Go handlers
run: |
cd mcp-server
go build ./...
build-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build CLI
run: |
cd cmd/team-cli
make build
- name: Upload CLI binary
uses: actions/upload-artifact@v4
with:
name: team-cli
path: cmd/team-cli/team