Update README.md #38
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: | |
| jobs: | |
| rust: | |
| name: Rust — fmt, clippy, test, bench | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install protoc | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Format | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Benchmark smoke run | |
| run: cargo run --release --bin hnsw-report -- 5000 64 | |
| python: | |
| name: Python ingestion tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install test dependencies | |
| run: pip install pytest numpy | |
| - name: Test | |
| run: cd ingestion && python -m pytest -q | |
| web: | |
| name: Web — lint and build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install | |
| run: cd web && npm ci --no-audit --no-fund | |
| - name: Lint | |
| run: cd web && npm run lint | |
| - name: Build | |
| run: cd web && npm run build | |
| terraform: | |
| name: Terraform validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: hashicorp/setup-terraform@v3 | |
| - name: Format check | |
| run: cd infra && terraform fmt -check -recursive | |
| - name: Validate | |
| run: | | |
| cd infra | |
| terraform init -backend=false -input=false | |
| terraform validate | |
| docker: | |
| name: Docker — build backend image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build server image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: deploy/Dockerfile.server | |
| push: false | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |