chores: rename project; vulns audit; changelog and releases #10
Workflow file for this run
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: | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.12" | |
| # Stdlib-only, so it runs before any install to fail as fast as possible. | |
| - name: Changelog documents the declared version | |
| run: python scripts/check_changelog.py | |
| - run: pip install ruff | |
| - run: ruff check src scripts tests | |
| - run: ruff format --check src scripts tests | |
| audit: | |
| # Known-vulnerability scan of the runtime dependency surface against the PyPI | |
| # advisory database. Auditing the project (rather than a frozen env) resolves | |
| # dependencies fresh from pyproject.toml, so this reflects what an operator's | |
| # install actually gets — including newer versions our `>=` floors allow. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install pip-audit | |
| - name: Audit dependencies for known vulnerabilities | |
| run: pip-audit . | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e ".[dev]" | |
| - run: pytest tests/unit -q | |
| build-sync: | |
| # Fails if the committed single-file distributables drifted from src/. | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - run: python scripts/build.py | |
| - name: Verify distributables are in sync with src/ | |
| run: git diff --exit-code open-webui/ | |
| integration-tests: | |
| # Live tests against real Tenki microVMs. Only run when the secret is present | |
| # (first-party pushes / manual dispatch); a no-op otherwise. | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - name: Run live integration tests (skips if no key) | |
| env: | |
| TENKI_API_KEY: ${{ secrets.TENKI_API_KEY }} | |
| TENKI_API_ENDPOINT: ${{ secrets.TENKI_API_ENDPOINT }} | |
| run: pytest tests/integration -q |