ci-dgraph-load-tests #7406
This file contains 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-load-tests | |
on: | |
push: | |
paths-ignore: | |
- '.github/CODEOWNERS' | |
- '.vscode/**' | |
- 'compose/**' | |
- 'contrib/systemd/**' | |
- 'licenses/**' | |
- 'paper/**' | |
- 'present/**' | |
- 'RFC/**' | |
- 'static/**' | |
- 'wiki/**' | |
- '**/**.dockerignore' | |
- '**/**.gitignore' | |
- '**/**.md' | |
- '**/**.png' | |
- '**/**.jpg' | |
- '**/**.gif' | |
- '**/**.ini' | |
branches: | |
- main | |
- 'release/**' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
branches: | |
- main | |
- 'release/**' | |
schedule: | |
- cron: "0 0 * * *" # 1 run per day | |
jobs: | |
dgraph-load-tests: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-20.04-32gb | |
steps: | |
- uses: actions/checkout@v3 | |
- 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: 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 # this internally builds dgraph binary | |
- 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 Load Tests | |
run: | | |
#!/bin/bash | |
# go env settings | |
export GOPATH=~/go | |
# move the binary | |
cp dgraph/dgraph ~/go/bin/dgraph | |
# run the load tests | |
cd t; ./t --suite=load | |
# clean up docker containers after test execution | |
./t -r | |
# sleep | |
sleep 5 |