Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(ci): add dgraph regression tests #1908

Merged
merged 4 commits into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ci-dgraph-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: ci-dgraph-tests
on:
push:
branches:
- main
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/v4@main
mangalaman93 marked this conversation as resolved.
Show resolved Hide resolved
- 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