-
Notifications
You must be signed in to change notification settings - Fork 83
44 lines (37 loc) · 1.14 KB
/
javascript_tests.yaml
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
# .github/workflows/javascript_tests.yml
name: JavaScript Tests
on:
push:
branches:
- main
pull_request_target:
types:
- opened
- labeled
jobs:
test:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'okay-to-test') || (github.event_name == 'push')
env:
CHROMA_URL: http://localhost:8000
CHROMA_COLLECTION_NAME: javascript_tests
steps:
# https://github.com/actions/checkout/issues/518
- name: Check out code
uses: actions/checkout@v3
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- name: Install dependencies
run: make init-js-sdk
- name: Run tests
working-directory: javascript-sdk
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}
PINECONE_INDEX_NAME: ${{ secrets.PINECONE_INDEX_NAME }}
run: |
tests/setup-and-run-tests.sh
- name: Dump docker logs
if: failure()
run: docker logs chroma