forked from amikos-tech/chroma-go
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (119 loc) · 3.68 KB
/
go.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Go
on:
pull_request:
branches: [ "main" , "**" ]
jobs:
paths-filter:
name: Get changed paths
runs-on: ubuntu-latest
outputs:
embeddings: ${{ steps.changes.outputs.embeddings }}
rerankings: ${{ steps.changes.outputs.rerankings }}
docs: ${{ steps.changes.outputs.docs }}
steps:
- name: Get changed paths
id: changes
uses: dorny/paths-filter@v3
with:
predicate-quantifier: 'some'
filters: |
embeddings:
- 'pkg/embeddings/**'
- 'pkg/commons/embed/**'
rerankings:
- 'pkg/rerankings/**'
- 'pkg/commons/cohere/**'
docs:
- 'docs/**'
lint:
name: Lint
runs-on: ubuntu-latest
environment: Test
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
build:
name: Build and Test
runs-on: ubuntu-latest
needs: [lint,paths-filter]
strategy:
matrix:
chroma-version: ["0.4.8", "0.4.24","0.5.0","0.5.5"]
environment: Test
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Build
run: make build
- name: Test
run: make test
env:
CHROMA_VERSION: ${{ matrix.chroma-version }}
ef:
name: Test Embedding Functions
runs-on: ubuntu-latest
needs: [build,paths-filter]
if: needs.paths-filter.outputs.embeddings == 'true'
environment: Test
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Build
run: make build
- name: Test
run: make test-ef
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
HF_API_KEY: ${{ secrets.HF_API_KEY }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_GATEWAY_ENDPOINT: ${{ secrets.CF_GATEWAY_ENDPOINT }}
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
NOMIC_API_KEY: ${{ secrets.NOMIC_API_KEY }}
JINA_API_KEY: ${{ secrets.JINA_API_KEY }}
rf:
name: Test Ranking Functions
runs-on: ubuntu-latest
needs: [build,ef,paths-filter]
if: needs.paths-filter.outputs.rerankings == 'true'
environment: Test
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Build
run: make build
- name: Test
run: make test-rf
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
HF_API_KEY: ${{ secrets.HF_API_KEY }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_GATEWAY_ENDPOINT: ${{ secrets.CF_GATEWAY_ENDPOINT }}
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
NOMIC_API_KEY: ${{ secrets.NOMIC_API_KEY }}
JINA_API_KEY: ${{ secrets.JINA_API_KEY }}