v0.2.0 Release (#197) #410
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: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| - "feature/*" | |
| - "hotfix/*" | |
| - "release/*" | |
| - "fixes/*" | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| pre-commit: | |
| name: Pre-commit Hooks CI | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.10.9" | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run Pre-commit | |
| run: | | |
| uv run pre-commit run --show-diff-on-failure --color=always --all-files | |
| unit_tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.10.9" | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run Tests | |
| run: | | |
| uv run pytest tests | |
| # Llama firewall is not yet supported | |
| # security_tests: | |
| # name: Security Tests | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v3 | |
| # - name: Set up Docker Buildx | |
| # uses: docker/setup-buildx-action@v3 | |
| # - name: Set up Docker Compose | |
| # run: | | |
| # sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose | |
| # sudo chmod +x /usr/local/bin/docker-compose | |
| # - name: Deploy Agent | |
| # run: HF_TOKEN=${{ secrets.HF_TOKEN }} docker compose -f compose.tests.yaml up -d --build | |
| # - name: Setup Python | |
| # uses: actions/setup-python@v4 | |
| # with: | |
| # python-version: 3.12 | |
| # - name: Install the latest version of uv | |
| # uses: astral-sh/setup-uv@v5 | |
| # with: | |
| # enable-cache: true | |
| # cache-dependency-glob: ".pre-commit-config.yaml" | |
| # - name: Install dependencies | |
| # run: | | |
| # uv sync --group ci | |
| # alias pip="uv pip" # T | |
| # - name: Run Security Tests | |
| # run: | | |
| # uv run pytest tests/security_tests |