Merge branch 'main' of github.com:TeaEntityLab/teaAgent #170
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| use-case-matrix: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Refresh acceptance status from acceptance tests | |
| run: python3 scripts/build_acceptance_status.py | |
| - name: Generate use-case coverage matrix | |
| run: python3 scripts/build_use_case_matrix.py | |
| - name: Sync acceptance tiers section | |
| run: python3 scripts/sync_acceptance_tiers_doc.py | |
| - name: Validate docs consistency | |
| run: python3 scripts/validate_docs_consistency.py | |
| - name: Upload use-case matrix artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: use-case-matrix | |
| path: docs/use-case-matrix.md | |
| acceptance-p0: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run acceptance P0 | |
| run: python3 scripts/run_acceptance_tier.py --tier p0 | |
| acceptance-p1: | |
| runs-on: ubuntu-latest | |
| needs: acceptance-p0 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run acceptance P1 | |
| run: python3 scripts/run_acceptance_tier.py --tier p1 | |
| acceptance-all: | |
| runs-on: ubuntu-latest | |
| needs: acceptance-p1 | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run full acceptance suite | |
| run: python3 scripts/run_acceptance_tier.py --tier all | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run tests | |
| run: pytest --cov=teaagent --cov-report=term-missing --cov-fail-under=85 | |
| test-telemetry: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies with telemetry extras | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,telemetry]" | |
| - name: Run telemetry tests | |
| run: pytest tests/test_telemetry.py -q | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Lint with ruff | |
| run: ruff check . | |
| - name: Check formatting with ruff | |
| run: ruff format --check . | |
| - name: Type check with mypy | |
| run: mypy teaagent/ | |
| package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package tooling | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[release]" | |
| - name: Build package distributions | |
| run: python -m build | |
| - name: Check package distributions | |
| run: python -m twine check dist/* | |
| - name: Install wheel and smoke test metadata | |
| run: | | |
| python -m venv /tmp/teaagent-wheel-smoke | |
| /tmp/teaagent-wheel-smoke/bin/python -m pip install --upgrade pip | |
| /tmp/teaagent-wheel-smoke/bin/python -m pip install dist/*.whl | |
| /tmp/teaagent-wheel-smoke/bin/python - <<'PY' | |
| import importlib.resources | |
| import teaagent | |
| assert teaagent.__version__ | |
| assert importlib.resources.files('teaagent').joinpath('py.typed').is_file() | |
| PY |