Repository navigation
Upgrade to master-class landing page with particle animation #45
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 | |
| # Minimal token permissions — Scorecard Token-Permissions check | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # ------------------------------------------------------------------ # | |
| # Job 1: Lint + Type-check # | |
| # ------------------------------------------------------------------ # | |
| lint: | |
| name: Lint & Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install lint tools | |
| run: | | |
| pip install --upgrade pip | |
| pip install ruff mypy | |
| pip install -r requirements.txt | |
| - name: Ruff format check | |
| run: ruff format --check . | |
| - name: Ruff lint | |
| run: ruff check . | |
| - name: MyPy strict | |
| run: mypy agents/ core/ vault/ --strict --ignore-missing-imports | |
| # ------------------------------------------------------------------ # | |
| # Job 2: Tests + Coverage (matrix: 3.11 and 3.12) # | |
| # ------------------------------------------------------------------ # | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install package + dev dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e '.[dev]' | |
| - name: Run tests with coverage | |
| run: | | |
| pytest tests/ \ | |
| --verbose \ | |
| --tb=short \ | |
| --cov=agents \ | |
| --cov=core \ | |
| --cov=vault \ | |
| --cov-branch \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml:coverage.xml \ | |
| --cov-fail-under=100 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
| with: | |
| files: coverage.xml | |
| fail_ci_if_error: true | |
| flags: python-${{ matrix.python-version }} | |
| # ------------------------------------------------------------------ # | |
| # Job 3: Build verification # | |
| # ------------------------------------------------------------------ # | |
| build: | |
| name: Build & Verify Package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install build tools | |
| run: pip install build twine | |
| - name: Build wheel and sdist | |
| run: python -m build | |
| - name: Verify with twine | |
| run: twine check dist/* | |
| - name: Test install from wheel | |
| run: | | |
| pip install dist/*.whl | |
| python -c "from vault import Vault, derive_key; print('Package import OK')" | |
| # ------------------------------------------------------------------ # | |
| # Job 4: Smoke test — run all examples end-to-end # | |
| # ------------------------------------------------------------------ # | |
| smoke: | |
| name: Smoke Tests | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install package | |
| run: pip install -e . | |
| - name: Run examples | |
| run: | | |
| python examples/simple_agent.py |