-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (55 loc) · 1.52 KB
/
run_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Run Tests
on:
workflow_call:
inputs:
git_ref:
required: true
type: string
secrets:
OPENAI_API_KEY:
required: true
jobs:
test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ inputs.git_ref }}
- uses: actions/setup-go@v5
with:
cache: false
go-version: "1.23"
- name: Validate
run: make validate
- name: Install gptscript
run: |
curl https://get.gptscript.ai/releases/default_linux_amd64_v1/gptscript -o ./gptscriptexe
chmod +x ./gptscriptexe
- name: Run Tests
env:
GPTSCRIPT_BIN: ./gptscriptexe
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: make test
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ inputs.git_ref }}
- uses: actions/setup-go@v5
with:
cache: false
go-version: "1.23"
- name: Install gptscript
run: |
curl https://get.gptscript.ai/releases/default_windows_amd64_v1/gptscript.exe -o gptscript.exe
- name: Create config file
- name: Run Tests
env:
GPTSCRIPT_BIN: .\gptscript.exe
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: make test