-
Notifications
You must be signed in to change notification settings - Fork 75
77 lines (65 loc) · 1.96 KB
/
test.yml
File metadata and controls
77 lines (65 loc) · 1.96 KB
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
name: Run tests
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
test:
permissions:
contents: "read"
id-token: "write"
runs-on: ubuntu-latest
services:
falkordb:
image: falkordb/falkordb:latest
ports:
- 6379:6379
ollama:
image: ollama/ollama:latest
ports:
- 11434:11434
volumes:
- ollama:/root/.ollama
strategy:
matrix:
model: [openai/gpt-4.1] # List of models
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.11.0 # Update with desired Python version
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- id: "auth"
uses: "google-github-actions/auth@v3"
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v3"
with:
version: ">= 363.0.0"
- name: Install dependencies
run: uv sync --extra test
- name: Wait for Ollama to be ready
run: |
until curl -s http://localhost:11434; do
echo "Waiting for Ollama..."
sleep 10
done
- name: Run tests
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
REGION: ${{ vars.REGION }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }}
AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }}
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }}
TEST_MODEL: ${{ matrix.model }} # Pass the model as an environment variable
run: uv run pytest