-
Notifications
You must be signed in to change notification settings - Fork 1.5k
73 lines (73 loc) · 2.04 KB
/
ci-dgraph-load-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: ci-dgraph-load-tests
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "*/30 * * * *"
jobs:
#TODO: WE NEED TO REMOVE THIS CLEANUP, and handle it more elegantly, it makes us incompatible with gh-hosted-runners
cleanup:
runs-on: self-hosted
container:
image: ubuntu:latest
steps:
- name: Cleaning up the $GITHUB_WORKSPACE as root from a Docker image
run: find /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/. -name . -o -prune -exec rm -rf -- {} + || true
dgraph-load-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- 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 Docker Image
run: make image-local
- name: Make Linux Build
run: |
#!/bin/bash
# go settings
export GOOS=linux
export GOARCH=amd64
# make dgraph binary
make dgraph
- name: Clean Up Environment
run: |
#!/bin/bash
# clean cache
go clean -testcache
# build the test binary
cd t; go build .
# clean up docker containers before test execution
./t -r
- name: Run Load Tests
run: |
#!/bin/bash
# clean cache
go clean -testcache
# go env settings
export GOPATH=~/go
# move the binary
cp dgraph/dgraph ~/go/bin
# build the test binary
cd t; go build .
# run the load tests
./t --suite=load
# clean up docker containers after test execution
./t -r