-
Notifications
You must be signed in to change notification settings - Fork 390
56 lines (48 loc) · 1.43 KB
/
build-test.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
name: build-test
on:
pull_request:
branches:
- main
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
container: debian:bullseye-slim
environment: build-test
services:
postgres:
image: ghcr.io/getzep/postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
nlp:
image: ghcr.io/getzep/zep-nlp-server:0.3.0-beta.0
env:
ENABLE_EMBEDDINGS: true
options: >-
--health-cmd "timeout 10s bash -c ':> /dev/tcp/127.0.0.1/5557' || exit 1"
--health-interval 10s
--health-timeout 10s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: install certs and build-essential (required by CGO)
run: apt-get update && apt-get install -y ca-certificates build-essential
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Build
run: go build -v ./...
- name: Test
run: CGO_ENABLED=1 go test -tags=testutils -race -p 1 -v ./...
env:
ZEP_OPENAI_API_KEY: ${{ secrets.ZEP_OPENAI_API_KEY }}
ZEP_STORE_POSTGRES_DSN: 'postgres://postgres:postgres@postgres:5432/?sslmode=disable'
ZEP_NLP_SERVER_URL: 'http://nlp:5557'