From 87a1db35da1fdd4a50a0d6186e690278ff340db9 Mon Sep 17 00:00:00 2001 From: Aman Mangal Date: Tue, 3 Dec 2024 18:49:56 +0530 Subject: [PATCH] add support for big float and fix tests --- .github/workflows/ci-dgraph4j-tests.yml | 22 ++++++++-------------- src/main/proto/api.proto | 11 +++-------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-dgraph4j-tests.yml b/.github/workflows/ci-dgraph4j-tests.yml index e2384a69..b0a9e1f5 100644 --- a/.github/workflows/ci-dgraph4j-tests.yml +++ b/.github/workflows/ci-dgraph4j-tests.yml @@ -18,12 +18,6 @@ jobs: name: dgraph4j-tests runs-on: ubuntu-20.04 steps: - - name: Checkout Dgraph repo # use latest dgraph build - uses: actions/checkout@v4 - with: - path: dgraph - repository: dgraph-io/dgraph - ref: main - name: Checkout dgraph4j repo uses: actions/checkout@v4 with: @@ -37,21 +31,21 @@ jobs: uses: gradle/actions/setup-gradle@v4 with: gradle-version: current - - name: Get Go Version - run: | - #!/bin/bash - cd dgraph - GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) - echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV + - name: Checkout Dgraph repo # use latest dgraph build + uses: actions/checkout@v4 + with: + path: dgraph + repository: dgraph-io/dgraph + ref: main - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GOVERSION }} + go-version-file: dgraph/go.mod - name: Build dgraph binary run: cd dgraph && make docker-image # builds docker image with local tag - name: Spin up local dgraph cluster run: cd dgraph4j && docker compose -f docker-compose.test.yml up -d - name: Run tests - run: cd dgraph4j && gradle build + run: cd dgraph4j && gradle build -i - name: Tear down cluster run: cd dgraph4j && docker compose -f docker-compose.test.yml down diff --git a/src/main/proto/api.proto b/src/main/proto/api.proto index 8d6018fd..90b11a0c 100644 --- a/src/main/proto/api.proto +++ b/src/main/proto/api.proto @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 Dgraph Labs, Inc. and Contributors + * Copyright (C) 2023 Dgraph Labs, Inc. and Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,7 @@ syntax = "proto3"; package api; -/* import "gogoproto/gogo.proto"; */ - -/* option (gogoproto.marshaler_all) = true; */ -/* option (gogoproto.sizer_all) = true; */ -/* option (gogoproto.unmarshaler_all) = true; */ -/* option (gogoproto.goproto_getters_all) = true; */ +option go_package = "github.com/dgraph-io/dgo/v240/protos/api"; option java_package = "io.dgraph"; option java_outer_classname = "DgraphProto"; @@ -175,7 +170,7 @@ message Value { bytes datetime_val = 9; string password_val = 10; uint64 uid_val=11; - // number 12 is reserved for bigfloat + bytes bigfloat_val=12; bytes vfloat32_val=13; } }