Merge pull request #62 from trustyai-explainability/bump-pandas #192
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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| env: | |
| PYTHON_VERSION: "3.12" | |
| UV_VERSION: "0.8.11" | |
| jobs: | |
| pre-commit: | |
| name: Pre-commit Checks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Cache uv dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| .venv | |
| key: ${{ matrix.python-version }}-uv-${{ hashFiles('**/uv.lock') }} | |
| restore-keys: | | |
| ${{ matrix.python-version }}-uv- | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra dev | |
| - name: Install pre-commit | |
| run: | | |
| uv run pip install pre-commit | |
| - name: Run pre-commit on all files | |
| run: | | |
| uv run pre-commit run --all-files --show-diff-on-failure | |
| - name: Run pre-commit on staged files (if any) | |
| run: | | |
| uv run pre-commit run --show-diff-on-failure | |
| integration-tests: | |
| name: Tier 2 - Integration Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| llama-stack-version: | |
| - "main" | |
| - "0.5.0" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Cache uv dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| .venv | |
| key: ${{ matrix.python-version }}-${{ matrix.llama-stack-version }}-uv-${{ hashFiles('**/uv.lock') }} | |
| restore-keys: | | |
| ${{ matrix.python-version }}-uv- | |
| - name: Install dependencies | |
| run: | | |
| uv sync --extra dev | |
| - name: Install llama-stack version | |
| run: | | |
| if [ "${{ matrix.llama-stack-version }}" = "main" ]; then | |
| uv pip install "llama-stack @ git+https://github.com/llamastack/llama-stack.git@main" | |
| uv pip install "llama-stack-api @ git+https://github.com/llamastack/llama-stack.git@main#subdirectory=src/llama_stack_api" | |
| else | |
| uv pip install "llama-stack==${{ matrix.llama-stack-version }}" | |
| uv pip install "llama-stack-api==${{ matrix.llama-stack-version }}" | |
| fi | |
| - name: Run integration tests | |
| run: | | |
| uv run pytest -m "lls_integration" -v --tb=short --maxfail=3 |