Skip to content

Commit b99e1c8

Browse files
committed
ci: update test.yml
Signed-off-by: Xin Liu <sam@secondstate.io>
1 parent a3841ca commit b99e1c8

File tree

3 files changed

+107
-1
lines changed

3 files changed

+107
-1
lines changed

.github/workflows/test.yml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
5252
- name: Run chat.hurl
5353
run: |
54-
hurl --test --jobs 1 ./tests/test_chat.hurl
54+
hurl --test --jobs 1 ./tests/chat.hurl
5555
5656
- name: Run embeddings.hurl
5757
run: |
@@ -60,3 +60,57 @@ jobs:
6060
- name: Stop GaiaNode
6161
run: |
6262
/home/runner/gaianet/bin/gaianet stop
63+
64+
test-rag:
65+
runs-on: ubuntu-latest
66+
67+
steps:
68+
- name: Clone project
69+
id: checkout
70+
uses: actions/checkout@v5
71+
72+
- name: Install dependencies
73+
run: |
74+
sudo apt-get update && sudo apt-get install -y curl git jq lsof supervisor
75+
76+
- name: Install Hurl
77+
run: |
78+
curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/5.0.1/hurl_5.0.1_amd64.deb
79+
sudo apt update && sudo apt install ./hurl_5.0.1_amd64.deb
80+
81+
- name: Install GaiaNode
82+
run: |
83+
chmod +x ./install.sh
84+
./install.sh
85+
export PATH=$HOME/gaianet/bin:$PATH
86+
gaianet --help
87+
88+
- name: Replace config.json for RAG test
89+
run: |
90+
cp ./tests/config_rag.json $HOME/gaianet/config.json
91+
92+
- name: Initialize GaiaNode
93+
run: |
94+
export PATH=$HOME/gaianet/bin:$PATH
95+
gaianet init
96+
sleep 10
97+
98+
- name: Start GaiaNode
99+
run: |
100+
export PATH=$HOME/gaianet/bin:$PATH
101+
gaianet start
102+
sleep 10
103+
104+
- name: Print logs
105+
if: failure()
106+
run: |
107+
cat $HOME/gaianet/log/gaia-nexus.log
108+
cat $HOME/gaianet/log/chat-server.log
109+
110+
- name: Run rag.hurl
111+
run: |
112+
hurl --test --jobs 1 ./tests/rag.hurl
113+
114+
- name: Stop GaiaNode
115+
run: |
116+
/home/runner/gaianet/bin/gaianet stop

tests/rag.hurl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# test /v1/models endpoint
2+
GET http://localhost:8080/v1/models
3+
screencapability: low
4+
HTTP 200
5+
[Asserts]
6+
jsonpath "$.data[0].id" == "Qwen3-4B"
7+
8+
# test /v1/chat/completions endpoint
9+
POST http://localhost:8080/v1/chat/completions
10+
Accept: application/json
11+
Content-Type: application/json
12+
```json
13+
{
14+
"messages": [
15+
{
16+
"role": "user",
17+
"content": "what is the location of Paris, France along the Seine river?"
18+
}
19+
],
20+
"model": "Qwen3-4B",
21+
"stream": false
22+
}
23+
```
24+
HTTP 200
25+
[Asserts]
26+
jsonpath "$.model" == "Qwen3-4B"
27+
jsonpath "$.choices[0].message.content" contains "Paris"

tests/test.config.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"address": "",
3+
"description": "The default GaiaNet node config with a Llama-3.2-3B-Instruct model.",
4+
"domain": "gaia.domains",
5+
"llamaedge_chat_port": "9068",
6+
"llamaedge_embedding_port": "9069",
7+
"llamaedge_port": "8080",
8+
"chat": "https://huggingface.co/second-state/Qwen3-4B-GGUF/resolve/main/Qwen3-4B-Q5_K_M.gguf",
9+
"chat_name": "Qwen3-4B",
10+
"chat_ctx_size": "16384",
11+
"chat_batch_size": "128",
12+
"chat_ubatch_size": "128",
13+
"prompt_template": "qwen3-no-think",
14+
"reverse_prompt": "",
15+
"system_prompt": "You are a helpful AI assistant. Please answer questions as clearly and concisely as possible.",
16+
"embedding": "https://huggingface.co/gaianet/Nomic-embed-text-v1.5-Embedding-GGUF/resolve/main/nomic-embed-text-v1.5.f16.gguf",
17+
"embedding_name": "Nomic-embed-text-v1.5",
18+
"embedding_ctx_size": "8192",
19+
"embedding_batch_size": "8192",
20+
"embedding_ubatch_size": "8192",
21+
"snapshot": "https://huggingface.co/datasets/gaianet/paris/resolve/main/paris_768_nomic-embed-text-v1.5-f16.snapshot",
22+
"embedding_collection_name": "default",
23+
"qdrant_limit": "1",
24+
"qdrant_score_threshold": "0.5"
25+
}

0 commit comments

Comments
 (0)