-
Notifications
You must be signed in to change notification settings - Fork 86
58 lines (58 loc) · 1.54 KB
/
ci-dgo-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
name: ci-dgo-tests
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- master
schedule:
- cron: "0 0 * * *" # run workflow daily
jobs:
dgo-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout Dgraph repo
uses: actions/checkout@v3
with:
path: dgraph
repository: dgraph-io/dgraph
ref: main
- name: Checkout Dgo repo
uses: actions/checkout@v3
with:
path: dgo
repository: dgraph-io/dgo
- name: Get Go Version
run: |
#!/bin/bash
cd dgraph
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: Make Linux Build and Docker Image
run: cd dgraph && make docker-image
- name: Move dgraph binary to gopath
run: cd dgraph && mv dgraph/dgraph ~/go/bin/dgraph
- name: Clean Up Test Cache
run: go clean -testcache
- name: Run dgo client tests
run: |
#!/bin/bash
cd dgo
# go env settings
export GOPATH=~/go
docker compose -f t/docker-compose.yml up -d
echo "Waiting for cluster to be healthy..."
sleep 20
echo "Running dgo tests..."
go test -v ./...
docker compose -f t/docker-compose.yml down