-
Notifications
You must be signed in to change notification settings - Fork 8
111 lines (87 loc) · 2.86 KB
/
run_test_and_gen_report.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Test and generate report
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
# Add permissions configuration
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: openagent
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11.5'
- name: Install poetry
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y postgresql-client libpq-dev
poetry install
poetry add pytest pytest-xdist
- name: Run tests
continue-on-error: true
env:
# Database settings
DB_CONNECTION: postgresql+psycopg://postgres:password@localhost:5432/openagent
# LLM provider settings
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GOOGLE_GEMINI_API_KEY: ${{ secrets.GOOGLE_GEMINI_API_KEY }}
OLLAMA_HOST: ${{ secrets.OLLAMA_HOST }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
# Optional API keys
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
MORALIS_API_KEY: ${{ secrets.MORALIS_API_KEY }}
ROOTDATA_API_KEY: ${{ secrets.ROOTDATA_API_KEY }}
COINGECKO_API_KEY: ${{ secrets.COINGECKO_API_KEY }}
# RSS3 API URLs
RSS3_DATA_API: https://gi.rss3.io
RSS3_SEARCH_API: https://devnet.rss3.io/search
run: |
pwd
ls -la
cd tests
poetry run python run_test.py
- name: Commit and push report
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Switch to docs branch
git fetch origin docs || git fetch origin main
git checkout docs || git checkout -b docs
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# Check if file exists
ls -la tests/compatible-models.mdx || echo "Report file not found!"
# Add all changes (including new files)
git add -A
# Show pending changes
git status
# Create commit with timestamp
git commit -m "docs: update compatibility test report" || echo "No changes to commit"
# Push changes to docs branch
git push origin docs