From 670723ba3e604d5aaa61bed43f9cccc70ad9630e Mon Sep 17 00:00:00 2001 From: Joshua Goldstein Date: Wed, 15 Mar 2023 11:25:30 -0500 Subject: [PATCH 1/4] add dgraph regression tests --- .github/workflows/ci-dgraph-tests.yml | 67 +++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/ci-dgraph-tests.yml diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml new file mode 100644 index 000000000..cb39cd165 --- /dev/null +++ b/.github/workflows/ci-dgraph-tests.yml @@ -0,0 +1,67 @@ +name: ci-dgraph-tests +on: + push: + branches: + - main + - 'release/**' +jobs: + dgraph-tests: + runs-on: [self-hosted, x64] + steps: + - name: Checkout Dgraph repo + uses: actions/checkout@v3 + with: + repository: dgraph-io/dgraph + ref: main + - name: Get Go Version + run: | + #!/bin/bash + GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) + echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ${{ env.GOVERSION }} + - name: Fetch latest Badger version + run: | + go get github.com/dgraph-io/badger@main + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install protobuf-compiler + run: sudo apt-get install -y protobuf-compiler + - name: Check protobuf + run: | + cd ./protos + go mod tidy + make regenerate + git diff --exit-code -- . + - name: Make Linux Build and Docker Image + run: make docker-image + - 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 Unit Tests + run: | + #!/bin/bash + # go env settings + export GOPATH=~/go + # move the binary + cp dgraph/dgraph ~/go/bin/dgraph + # run the tests + cd t; ./t + # clean up docker containers after test execution + ./t -r + # sleep + sleep 5 + \ No newline at end of file From 67b20f3cba087ff17cf168e17a0305efb58df45e Mon Sep 17 00:00:00 2001 From: Joshua Goldstein Date: Wed, 15 Mar 2023 11:28:28 -0500 Subject: [PATCH 2/4] newline --- .github/workflows/ci-dgraph-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index cb39cd165..e87827bd0 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -64,4 +64,3 @@ jobs: ./t -r # sleep sleep 5 - \ No newline at end of file From b9fdc8c95b61649aee77b7246cb8662303d957e8 Mon Sep 17 00:00:00 2001 From: Joshua Goldstein Date: Wed, 15 Mar 2023 11:37:09 -0500 Subject: [PATCH 3/4] fix import path --- .github/workflows/ci-dgraph-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index e87827bd0..54e94f390 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -24,7 +24,7 @@ jobs: go-version: ${{ env.GOVERSION }} - name: Fetch latest Badger version run: | - go get github.com/dgraph-io/badger@main + go get github.com/dgraph-io/badger/v4@main - name: Set up Node uses: actions/setup-node@v3 with: From 7084ad6e87b611ac3ec83786d46321fb6aee89bd Mon Sep 17 00:00:00 2001 From: Joshua Goldstein <92491720+joshua-goldstein@users.noreply.github.com> Date: Wed, 15 Mar 2023 12:08:17 -0500 Subject: [PATCH 4/4] Update ci-dgraph-tests.yml --- .github/workflows/ci-dgraph-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-dgraph-tests.yml b/.github/workflows/ci-dgraph-tests.yml index 54e94f390..5c277c6ba 100644 --- a/.github/workflows/ci-dgraph-tests.yml +++ b/.github/workflows/ci-dgraph-tests.yml @@ -3,7 +3,6 @@ on: push: branches: - main - - 'release/**' jobs: dgraph-tests: runs-on: [self-hosted, x64]