-
Notifications
You must be signed in to change notification settings - Fork 1.5k
71 lines (71 loc) · 2.02 KB
/
ci-dgraph-vector-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
name: ci-dgraph-vector-tests
on:
pull_request:
paths:
- '**/*.go'
- '**/go.mod'
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *" # 1 run per day
jobs:
dgraph-vector-tests:
if: github.event.pull_request.draft == false
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install protobuf-compiler
run: sudo apt update && sudo apt 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: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- 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 Vector Tests
run: |
#!/bin/bash
# go env settings
export GOPATH=~/go
# move the binary
cp dgraph/dgraph ~/go/bin/dgraph
# run the unit and vector tests
cd t; ./t --suite=vector
# clean up docker containers after test execution
./t -r
# sleep
sleep 5
- name: Upload Test Results
if: always() # Upload the results even if the tests fail
continue-on-error: true # don't fail this job if the upload fails
uses: trunk-io/analytics-uploader@main
with:
junit-paths: "./test-results.xml"
org-slug: hypermode
token: ${{ secrets.TRUNK_TOKEN }}