-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (76 loc) · 2.43 KB
/
autoblocks-testing.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
name: Autoblocks Testing
on:
push: # Run on every push.
schedule: # Run every day at ~7:17am PST.
- cron: '17 15 * * *'
workflow_dispatch: # Allow runs triggered from Autoblocks UI.
inputs:
autoblocks-overrides:
type: string
description: Overrides for Autoblocks-managed entities
required: false
permissions:
# Allow commenting on pull requests
issues: write
# Allow getting associated pull requests when event is type `push`
pull-requests: write
contents: read
jobs:
py-autoblocks-tests:
runs-on: ubuntu-latest
strategy:
matrix:
project:
- Python/testing-sdk
- Python/testing-sdk-with-prompt-sdk
- Python/dspy
- Python/pinecone
defaults:
run:
shell: bash
working-directory: ${{ matrix.project }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install poetry
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Check pyproject.toml & poetry.lock are in sync
run: poetry lock --check
- name: Install dependencies
run: poetry install
- name: Run mypy
run: poetry run mypy
if: matrix.project == 'Python/testing-sdk'
- name: Run Autoblocks tests
run: npx autoblocks testing exec -- poetry run start
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AUTOBLOCKS_API_KEY: ${{ secrets.AUTOBLOCKS_API_KEY }}
AUTOBLOCKS_INGESTION_KEY: ${{ secrets.AUTOBLOCKS_INGESTION_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
js-autoblocks-tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: JavaScript/testing-sdk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run Autoblocks tests
run: npx autoblocks testing exec -- npm run start
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AUTOBLOCKS_API_KEY: ${{ secrets.AUTOBLOCKS_API_KEY }}