-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.53 KB
/
test.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
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Test Code
run: |
go build -v ./...
go test -v -race ./...
ai:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Test Code
env:
CHATGPT_API_KEY: ${{ secrets.CHATGPT_API_KEY }}
CHATGPT_PROXY: ${{ secrets.CHATGPT_PROXY }}
CHATGPT_ENDPOINT: ${{ secrets.CHATGPT_ENDPOINT }}
CHATGPT_MODEL: ${{ secrets.CHATGPT_MODEL }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GEMINI_PROXY: ${{ secrets.GEMINI_PROXY }}
GEMINI_ENDPOINT: ${{ secrets.GEMINI_ENDPOINT }}
GEMINI_MODEL: ${{ secrets.GEMINI_MODEL }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
ANTHROPIC_PROXY: ${{ secrets.ANTHROPIC_PROXY }}
ANTHROPIC_ENDPOINT: ${{ secrets.ANTHROPIC_ENDPOINT }}
ANTHROPIC_MODEL: ${{ secrets.ANTHROPIC_MODEL }}
run: go test -v