Skip to content

Property key index - ⚠️ Breaking rolling-upgrade changes to storage ⚠️ #557

Property key index - ⚠️ Breaking rolling-upgrade changes to storage ⚠️

Property key index - ⚠️ Breaking rolling-upgrade changes to storage ⚠️ #557

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
paths:
- "docker/**"
- "lib/**"
- "macos/**"
- "pkg/**"
- "plugins/**"
- "scripts/**"
- "ui/**"
- "go.mod"
- "go.sum"
pull_request:
branches:
- "main"
paths:
- "docker/**"
- "lib/**"
- "macos/**"
- "pkg/**"
- "plugins/**"
- "scripts/**"
- "ui/**"
- "go.mod"
- "go.sum"
workflow_dispatch:
inputs:
branch:
description: "Branch, tag, or commit SHA to run CI against"
required: true
default: "main"
type: string
jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }}
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.0"
cache: true
- name: Install dependencies
run: go mod download
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Build UI assets
run: |
cd ui
npm ci
npm run build
- name: Prepare llama CPU libs
run: bash scripts/hydrate-llama-cpu-libs.sh
- name: Build
run: make build
- name: Test
run: |
set -o pipefail
# Run each package group as its own go-test invocation so a
# crash, OOM, or hang surfaces with the package name attached.
# Previously a single `make test-serial | grep` swallowed all
# output, so a runner-level kill (exit 143) gave no clue which
# package was at fault. Groups are roughly ordered by cost so
# cheap suites fail fast.
run_group() {
local name="$1"; shift
echo "::group::test ${name}"
local start_ts=$(date +%s)
if ! go test -p 1 -parallel 4 -timeout 30m "$@"; then
echo "::error title=test failed::group ${name} failed"
echo "::endgroup::"
return 1
fi
local end_ts=$(date +%s)
echo "${name} ok ($((end_ts - start_ts))s)"
echo "::endgroup::"
}
run_group cmd ./cmd/...
run_group apoc ./apoc/...
run_group plugins ./plugins/...
run_group util-small \
./pkg/audit/... ./pkg/auth/... ./pkg/buildinfo/... \
./pkg/cache/... ./pkg/compliance/... ./pkg/config/... \
./pkg/convert/... ./pkg/embed/... ./pkg/embeddingutil/... \
./pkg/encryption/... ./pkg/envutil/... ./pkg/errors/... \
./pkg/eval/... ./pkg/fabric/... ./pkg/filter/... \
./pkg/gpu/... ./pkg/heimdall/... ./pkg/indexing/... \
./pkg/inference/... ./pkg/kms/... ./pkg/knowledgepolicy/... \
./pkg/lifecycle/... ./pkg/linkpredict/... ./pkg/localllm/... \
./pkg/math/... ./pkg/mcp/... ./pkg/multidb/... \
./pkg/nornicgrpc/... ./pkg/observability/... ./pkg/pool/... \
./pkg/qdrantgrpc/... ./pkg/retention/... ./pkg/security/... \
./pkg/simd/... ./pkg/storage/lifecycle/... ./pkg/temporal/... \
./pkg/textchunk/... ./pkg/txsession/... ./pkg/util/... \
./pkg/vectorspace/...
run_group graphql ./pkg/graphql/...
run_group cypher ./pkg/cypher/...
run_group search ./pkg/search/...
run_group bolt ./pkg/bolt/...
run_group storage ./pkg/storage
run_group nornicdb ./pkg/nornicdb/...
run_group server ./pkg/server/...
run_group replication ./pkg/replication/...
coverage:
name: Coverage
runs-on: ubuntu-latest
needs: test
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }}
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.0"
cache: true
- name: Install dependencies
run: go mod download
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Build UI assets
run: |
cd ui
npm ci
npm run build
- name: Prepare llama CPU libs
run: bash scripts/hydrate-llama-cpu-libs.sh
- name: Generate coverage report
run: |
set -o pipefail
# Mirror the test step's grouping so a failing or hung
# package surfaces with a name attached instead of timing
# out the whole job. Each group appends to the same raw
# profile; a single filter pass at the end produces
# coverage.out for goveralls. Coverage exclusions
# (generated code, GPU stubs, etc.) live in
# scripts/generate-coverage.sh so the per-group invocations
# don't need to know about them.
: > coverage.raw.out
run_cov_group() {
local name="$1"; shift
echo "::group::coverage ${name}"
if ! bash scripts/generate-coverage.sh --append coverage.raw.out "$name" "$@"; then
echo "::error title=coverage failed::group ${name} failed"
echo "::endgroup::"
return 1
fi
echo "::endgroup::"
}
run_cov_group util-small \
./pkg/audit/... ./pkg/auth/... ./pkg/buildinfo/... \
./pkg/cache/... ./pkg/compliance/... ./pkg/config/... \
./pkg/convert/... ./pkg/embed/... ./pkg/embeddingutil/... \
./pkg/encryption/... ./pkg/envutil/... ./pkg/errors/... \
./pkg/eval/... ./pkg/fabric/... ./pkg/filter/... \
./pkg/gpu/... ./pkg/heimdall/... ./pkg/indexing/... \
./pkg/inference/... ./pkg/kms/... ./pkg/knowledgepolicy/... \
./pkg/lifecycle/... ./pkg/linkpredict/... ./pkg/localllm/... \
./pkg/math/... ./pkg/mcp/... ./pkg/multidb/... \
./pkg/nornicgrpc/... ./pkg/observability/... ./pkg/pool/... \
./pkg/qdrantgrpc/... ./pkg/retention/... ./pkg/security/... \
./pkg/simd/... ./pkg/storage/lifecycle/... ./pkg/temporal/... \
./pkg/textchunk/... ./pkg/txsession/... ./pkg/util/... \
./pkg/vectorspace/...
run_cov_group graphql ./pkg/graphql/...
run_cov_group cypher ./pkg/cypher/...
run_cov_group search ./pkg/search/...
run_cov_group bolt ./pkg/bolt/...
run_cov_group storage ./pkg/storage
run_cov_group nornicdb ./pkg/nornicdb/...
run_cov_group server ./pkg/server/...
run_cov_group replication ./pkg/replication/...
bash scripts/generate-coverage.sh --filter coverage.raw.out coverage.out
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Upload coverage to Coveralls
if: ${{ env.COVERALLS_REPO_TOKEN != '' }}
run: |
"$(go env GOPATH)/bin/goveralls" \
-coverprofile=coverage.out \
-service=github \
-repotoken="$COVERALLS_REPO_TOKEN"