File: //opt/chroma/.github/workflows/_go-tests.yml
name: Go tests
on:
workflow_call:
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
services:
postgres:
image: postgres
env:
POSTGRES_USER: chroma
POSTGRES_PASSWORD: chroma
POSTGRES_DB: chroma
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/go
- name: Build and test
run: make test
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
working-directory: go
cluster-test:
runs-on: "16core-64gb-ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/go
- uses: ./.github/actions/tilt
- run: bin/cluster-test.sh bash -c 'cd go && go test -timeout 30s -run ^TestNodeWatcher$ github.com/chroma-core/chroma/go/pkg/memberlist_manager'