feat(core): Add new index PartitionedHNSW for vectors #2595
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-dgraph-vector-tests | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| branches: | |
| - main | |
| - release/** | |
| schedule: | |
| - cron: 0 0 * * * # 1 run per day | |
| permissions: | |
| contents: read | |
| jobs: | |
| changes: | |
| uses: ./.github/workflows/detect-changes.yml | |
| dgraph-vector-tests: | |
| needs: changes | |
| # The scheduled (nightly) run always executes: detect-changes has no diff | |
| # to inspect on a schedule event and outputs code=false, which used to | |
| # silently skip every nightly run. !cancelled() lets the condition be | |
| # evaluated even if the changes job failed on a schedule event. | |
| if: >- | |
| !cancelled() && (github.event_name == 'schedule' || | |
| (needs.changes.outputs.code == 'true' && github.event.pull_request.draft == false)) | |
| runs-on: blacksmith-16vcpu-ubuntu-2404 | |
| timeout-minutes: 180 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install protobuf-compiler | |
| run: sudo apt update && sudo apt install -y protobuf-compiler | |
| - name: Check protobuf | |
| run: | | |
| cd ./protos | |
| go mod tidy | |
| make regenerate | |
| git diff -b --exit-code -- . | |
| - name: Make Linux Build and Docker Image | |
| run: make docker-image | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@latest | |
| - name: Build Test Binary | |
| run: | | |
| #!/bin/bash | |
| # build the test binary | |
| cd t; go build . | |
| - name: Clean Up Environment | |
| run: | | |
| #!/bin/bash | |
| # clean cache | |
| go clean -testcache | |
| # clean up docker containers before test execution | |
| cd t; ./t -r | |
| - name: Run Vector Tests | |
| env: | |
| # Lane selection: the scheduled (nightly) run executes the whole | |
| # suite; PR-triggered runs skip the long-running tests gated by | |
| # skipUnlessNightlyLane (currently TestVectorIncrBackupRestore). | |
| # The t runner passes its environment through to `go test`. | |
| VECTOR_TEST_LANE: ${{ github.event_name == 'schedule' && 'nightly' || 'pr' }} | |
| run: | | |
| #!/bin/bash | |
| # go env settings | |
| export GOPATH=~/go | |
| # move the binary | |
| cp dgraph/dgraph ~/go/bin/dgraph | |
| # run the unit and vector tests | |
| # NOTE: the 150m per-package go-test timeout is for the nightly lane, | |
| # which runs the slow IncrBackupRestore (~35min per index mode) with | |
| # full assertions; the PR lane finishes well under the default. | |
| cd t; ./t --suite=vector --timeout 150m | |
| # clean up docker containers after test execution | |
| ./t -r | |
| # sleep | |
| sleep 5 | |
| - name: Upload Test Results | |
| if: always() # Upload the results even if the tests fail | |
| continue-on-error: true # don't fail this job if the upload fails | |
| uses: trunk-io/analytics-uploader@v2 | |
| with: | |
| junit-paths: ./test-results.xml | |
| org-slug: dgraph-io | |
| token: ${{ secrets.TRUNK_TOKEN }} |