group search results by library #44
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: [master] | |
| pull_request: | |
| jobs: | |
| go: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: go test ./... | |
| web: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - run: npm ci | |
| - run: npm test | |
| - run: npm run build | |
| corpus: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: python3 -m pip install pyyaml | |
| - run: python3 scripts/check-compliance.py --json | |
| retrieval: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: go run ./cmd/retrieval-eval --backend local --fixtures evals/retrieval-fixtures.yaml --min-accuracy 1.0 --max-latency-ms 50 | |
| migrations: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16-alpine | |
| env: | |
| POSTGRES_DB: llm_code_docs | |
| POSTGRES_USER: llm_code_docs | |
| POSTGRES_PASSWORD: llm_code_docs | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U llm_code_docs -d llm_code_docs" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| docker run --rm --network host -v "$PWD/migrations:/migrations:ro" postgres:16-alpine sh -ec ' | |
| for migration in /migrations/*.sql; do | |
| PGPASSWORD=llm_code_docs psql -h 127.0.0.1 -U llm_code_docs -d llm_code_docs -v ON_ERROR_STOP=1 -f "$migration" | |
| done | |
| ' | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: | | |
| tmp="$(mktemp -d)" | |
| mkdir -p "$tmp/docs/smoke/llms" | |
| cat > "$tmp/docs/smoke/_meta.yaml" <<'YAML' | |
| name: smoke | |
| primary_source: llms | |
| sources: | |
| - type: llms | |
| url: https://example.com/llms.txt | |
| description: smoke docs | |
| YAML | |
| printf '# Smoke\n\nPostgres import fixture.\n' > "$tmp/docs/smoke/llms/index.md" | |
| DATABASE_URL=postgres://llm_code_docs:llm_code_docs@127.0.0.1:5432/llm_code_docs?sslmode=disable \ | |
| STORAGE_PROVIDER=file \ | |
| LLM_DOCS_BLOB_DIR="$tmp/blobs" \ | |
| LLM_DOCS_CORPUS_DIR="$tmp/docs" \ | |
| go run ./cmd/corpus-importer | jq -e '.documents == 1 and .artifacts == 2 and (.failed | length == 0)' | |
| compose: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: docker compose --env-file .env.example config -q | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - run: docker build -t llm-code-docs:ci . | |
| docker-smoke: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: bash scripts/docker-smoke.sh .env.example |