Repository navigation
test(tests): pass exclude_resource_kinds in the code pipeline citation test #195
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: PR Safety | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| name: Lint and format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install lint tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ruff==0.15.9 | |
| - name: Run ruff lint | |
| run: ruff check . | |
| - name: Check formatting | |
| run: ruff format --check docs-agent-mcp/mcp-server tests | |
| compile: | |
| name: Python compile check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Compile Python sources | |
| run: | | |
| python -m compileall \ | |
| docs-agent-mcp/pipelines \ | |
| docs-agent-mcp/mcp-server \ | |
| legacy/server \ | |
| legacy/server-https \ | |
| scripts \ | |
| tests | |
| helm: | |
| name: Helm lint and render | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: v3.21.0 | |
| - name: Lint charts | |
| run: | | |
| helm lint docs-agent-mcp/charts/docs-agent | |
| helm lint docs-agent-mcp/charts/pr-eval --set pr=1 --set headSha=0123456789abcdef | |
| helm lint docs-agent-mcp/charts/gateway-guardrails \ | |
| --set domain=agent.example.org --set gateway.tls.acme.email=ci@example.org | |
| # Every catalog profile must lint, not just the active one. | |
| for profile in $(helm show values docs-agent-mcp/charts/llm-runtime | yq '.catalog | keys | .[]'); do | |
| helm lint docs-agent-mcp/charts/llm-runtime --set "model=${profile}" | |
| done | |
| - name: Render charts | |
| run: | | |
| helm template docs-agent docs-agent-mcp/charts/docs-agent \ | |
| --namespace docs-agent --set-string mcp.image.tag=ci-test >/dev/null | |
| yq '.spec.template.spec.source.helm.valuesObject' deploy/argocd/apps/docs-agent-preview.yaml > /tmp/preview-values.yaml | |
| helm template docs-agent-preview docs-agent-mcp/charts/docs-agent \ | |
| --namespace docs-agent-preview -f /tmp/preview-values.yaml \ | |
| --set-string mcp.image.tag=pr-1-01234567 >/dev/null | |
| helm template pr-eval docs-agent-mcp/charts/pr-eval --namespace docs-agent-staging \ | |
| --set pr=1 --set headSha=0123456789abcdef --set imageTag=pr-1-01234567 >/dev/null | |
| for profile in $(helm show values docs-agent-mcp/charts/llm-runtime | yq '.catalog | keys | .[]'); do | |
| helm template llm-runtime docs-agent-mcp/charts/llm-runtime \ | |
| --namespace ml-infra --set "model=${profile}" >/dev/null | |
| done | |
| helm template gateway-guardrails docs-agent-mcp/charts/gateway-guardrails \ | |
| --namespace docs-agent \ | |
| --set domain=agent.example.org --set gateway.tls.acme.email=ci@example.org >/dev/null | |
| test: | |
| name: Pytest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: 'pip' | |
| cache-dependency-path: requirements-test.txt | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-test.txt | |
| - name: Run tests | |
| run: pytest -v --tb=short |