feat: add AsyncMySQLDb (#5425) #17856
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: Validation | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| branches: | |
| - "main" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| style-check-agno: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| defaults: | |
| run: | |
| working-directory: libs/agno | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -e .[dev] | |
| - name: Ruff check | |
| run: | | |
| ruff check . | |
| - name: Mypy | |
| run: | | |
| mypy . --config-file pyproject.toml | |
| style-check-cookbook: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| defaults: | |
| run: | |
| working-directory: cookbook | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -e "../libs/agno/"[dev] | |
| - name: Ruff check | |
| run: | | |
| ruff check . | |
| # - name: Mypy | |
| # run: | | |
| # mypy . | |
| style-check-agno-infra: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| defaults: | |
| run: | |
| working-directory: libs/agno_infra | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install -e .[dev] | |
| - name: Ruff check | |
| run: | | |
| ruff check . | |
| - name: Mypy | |
| run: | | |
| mypy . --config-file pyproject.toml | |
| tests: | |
| runs-on: ubuntu-latest | |
| # Skip push events if there's an open PR from the same branch | |
| if: github.event_name != 'push' || !github.event.pull_request | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| fail-fast: true # Stop all matrix jobs if one fails | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| set -e | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Run test setup | |
| working-directory: . | |
| run: | | |
| set -e | |
| ./scripts/test_setup.sh | |
| - name: Run tests for Agno | |
| working-directory: . | |
| env: | |
| AGNO_TELEMETRY: false | |
| run: | | |
| source .venv/bin/activate | |
| python -m pytest --cov=agno --cov-report=json:coverage-agno.json ./libs/agno/tests/unit | |
| echo "AGNO_COVERAGE=$(python -c 'import json; print(json.load(open("coverage-agno.json"))["totals"]["percent_covered_display"])')" >> $GITHUB_ENV |