refactor: merge redundant path entries in .coderabbit.yaml #19
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: | |
| pull_request: | |
| # Set minimal permissions for security | |
| permissions: | |
| contents: read | |
| security-events: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Lint | |
| run: | | |
| ruff check src | |
| black --check src | |
| - name: Security audit | |
| id: security-audit | |
| continue-on-error: true | |
| run: | | |
| safety scan --json > safety-results.json | |
| pip-audit --desc --format=json --output=audit-results.json | |
| - name: Upload security audit results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: security-audit-results | |
| path: | | |
| safety-results.json | |
| audit-results.json | |
| - name: Security audit failure notification | |
| if: failure() && steps.security-audit.outcome == 'failure' | |
| run: | | |
| echo "::warning::Security audit failed! Check the security-audit-results artifact for details." | |
| echo "::group::Safety scan results" | |
| if [ -f safety-results.json ]; then | |
| cat safety-results.json | |
| else | |
| echo "safety-results.json not found" | |
| fi | |
| echo "::endgroup::" | |
| echo "::group::Pip audit results" | |
| if [ -f audit-results.json ]; then | |
| cat audit-results.json | |
| else | |
| echo "audit-results.json not found" | |
| fi | |
| echo "::endgroup::" | |
| - name: Import smoke test | |
| run: | | |
| python - << 'PY' | |
| import importlib | |
| import sys | |
| sys.path.append('src') | |
| import contextforge_memory | |
| from contextforge_memory.main import app | |
| print('Import smoke test: OK') | |
| PY | |
| - name: Basic functionality test | |
| run: | | |
| python - << 'PY' | |
| import sys | |
| sys.path.append('src') | |
| from contextforge_memory.main import app, _embed_text | |
| # Test embedding function | |
| test_text = "test embedding" | |
| embedding = _embed_text(test_text) | |
| assert len(embedding) == 32, f"Expected 32 dimensions, got {len(embedding)}" | |
| assert all(0 <= x <= 1 for x in embedding), "Embeddings should be normalized to [0,1]" | |
| print('Basic functionality test: OK') | |
| PY | |