Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 6518c54

Browse files
author
Harry Le
committed
test: try 1
1 parent e408f78 commit 6518c54

File tree

4 files changed

+220
-119
lines changed

4 files changed

+220
-119
lines changed

.github/workflows/cortex-cpp-quality-gate.yml

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: CI Quality Gate Cortex CPP
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened, ready_for_review]
6-
paths: ["engine/**", ".github/workflows/cortex-cpp-quality-gate.yml"]
4+
# pull_request:
5+
# types: [opened, synchronize, reopened, ready_for_review]
6+
# paths: ["engine/**", ".github/workflows/cortex-cpp-quality-gate.yml"]
77
workflow_dispatch:
8-
schedule:
9-
- cron: '0 22 * * *'
8+
# schedule:
9+
# - cron: '0 22 * * *'
1010

1111
env:
1212
LLM_MODEL_URL: https://delta.jan.ai/tinyllama-1.1b-chat-v0.3.Q2_K.gguf
@@ -131,7 +131,7 @@ jobs:
131131
cp build/cortex build/cortex-beta
132132
python -m pip install --upgrade pip
133133
python -m pip install -r e2e-test/requirements.txt
134-
python e2e-test/main.py
134+
python e2e-test/main-harry
135135
rm build/cortex-nightly
136136
rm build/cortex-beta
137137
env:
@@ -145,7 +145,7 @@ jobs:
145145
cp build/cortex.exe build/cortex-beta.exe
146146
python -m pip install --upgrade pip
147147
python -m pip install -r e2e-test/requirements.txt
148-
python e2e-test/main.py
148+
python e2e-test/main-harry
149149
rm build/cortex-nightly.exe
150150
rm build/cortex-beta.exe
151151
env:
@@ -159,7 +159,7 @@ jobs:
159159
cp build/cortex build/cortex-beta
160160
python -m pip install --upgrade pip
161161
python -m pip install -r e2e-test/requirements.txt
162-
python e2e-test/cortex-llamacpp-e2e-nightly.py
162+
python e2e-test/main-harry.py
163163
rm build/cortex-nightly
164164
rm build/cortex-beta
165165
env:
@@ -173,7 +173,7 @@ jobs:
173173
cp build/cortex.exe build/cortex-beta.exe
174174
python -m pip install --upgrade pip
175175
python -m pip install -r e2e-test/requirements.txt
176-
python e2e-test/cortex-llamacpp-e2e-nightly.py
176+
python e2e-test/main-harry.py
177177
rm build/cortex-nightly.exe
178178
rm build/cortex-beta.exe
179179
env:
@@ -218,58 +218,58 @@ jobs:
218218
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
219219
AWS_DEFAULT_REGION: "${{ secrets.MINIO_REGION }}"
220220

221-
build-docker-and-test:
222-
runs-on: ubuntu-24-04-docker
223-
steps:
224-
- name: Getting the repo
225-
uses: actions/checkout@v3
226-
with:
227-
submodules: 'recursive'
221+
# build-docker-and-test:
222+
# runs-on: ubuntu-24-04-docker
223+
# steps:
224+
# - name: Getting the repo
225+
# uses: actions/checkout@v3
226+
# with:
227+
# submodules: 'recursive'
228228

229-
- name: Run Docker
230-
if: github.event_name != 'schedule'
231-
run: |
232-
docker build \
233-
--build-arg REMOTE_CACHE_URL="${{ secrets.MINIO_ENDPOINT }}/vcpkg-cache" \
234-
--build-arg MINIO_ENDPOINT_URL="${{ secrets.MINIO_ENDPOINT }}" \
235-
--build-arg MINIO_ACCESS_KEY="${{ secrets.MINIO_ACCESS_KEY_ID }}" \
236-
--build-arg MINIO_SECRET_KEY="${{ secrets.MINIO_SECRET_ACCESS_KEY }}" \
237-
-t menloltd/cortex:test -f docker/Dockerfile.cache .
238-
docker run -it -d -p 3928:39281 --name cortex menloltd/cortex:test
239-
sleep 20
229+
# - name: Run Docker
230+
# if: github.event_name != 'schedule'
231+
# run: |
232+
# docker build \
233+
# --build-arg REMOTE_CACHE_URL="${{ secrets.MINIO_ENDPOINT }}/vcpkg-cache" \
234+
# --build-arg MINIO_ENDPOINT_URL="${{ secrets.MINIO_ENDPOINT }}" \
235+
# --build-arg MINIO_ACCESS_KEY="${{ secrets.MINIO_ACCESS_KEY_ID }}" \
236+
# --build-arg MINIO_SECRET_KEY="${{ secrets.MINIO_SECRET_ACCESS_KEY }}" \
237+
# -t menloltd/cortex:test -f docker/Dockerfile.cache .
238+
# docker run -it -d -p 3928:39281 --name cortex menloltd/cortex:test
239+
# sleep 20
240240

241-
- name: Run Docker
242-
if: github.event_name == 'schedule'
243-
run: |
244-
latest_prerelease=$(curl -s https://api.github.com/repos/cortexcpp/cortex.cpp/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -n 1)
245-
echo "cortex.llamacpp latest release: $latest_prerelease"
246-
docker build \
247-
--build-arg REMOTE_CACHE_URL="${{ secrets.MINIO_ENDPOINT }}/vcpkg-cache" \
248-
--build-arg MINIO_ENDPOINT_URL="${{ secrets.MINIO_ENDPOINT }}" \
249-
--build-arg MINIO_ACCESS_KEY="${{ secrets.MINIO_ACCESS_KEY_ID }}" \
250-
--build-arg MINIO_SECRET_KEY="${{ secrets.MINIO_SECRET_ACCESS_KEY }}" \
251-
--build-arg CORTEX_CPP_VERSION="${latest_prerelease}" \
252-
-t menloltd/cortex:test -f docker/Dockerfile.cache .
253-
docker run -it -d -p 3928:39281 --name cortex menloltd/cortex:test
254-
sleep 20
241+
# - name: Run Docker
242+
# if: github.event_name == 'schedule'
243+
# run: |
244+
# latest_prerelease=$(curl -s https://api.github.com/repos/cortexcpp/cortex.cpp/releases | jq -r '.[] | select(.prerelease == true) | .tag_name' | head -n 1)
245+
# echo "cortex.llamacpp latest release: $latest_prerelease"
246+
# docker build \
247+
# --build-arg REMOTE_CACHE_URL="${{ secrets.MINIO_ENDPOINT }}/vcpkg-cache" \
248+
# --build-arg MINIO_ENDPOINT_URL="${{ secrets.MINIO_ENDPOINT }}" \
249+
# --build-arg MINIO_ACCESS_KEY="${{ secrets.MINIO_ACCESS_KEY_ID }}" \
250+
# --build-arg MINIO_SECRET_KEY="${{ secrets.MINIO_SECRET_ACCESS_KEY }}" \
251+
# --build-arg CORTEX_CPP_VERSION="${latest_prerelease}" \
252+
# -t menloltd/cortex:test -f docker/Dockerfile.cache .
253+
# docker run -it -d -p 3928:39281 --name cortex menloltd/cortex:test
254+
# sleep 20
255255

256-
- name: use python
257-
uses: actions/setup-python@v5
258-
with:
259-
python-version: "3.10"
256+
# - name: use python
257+
# uses: actions/setup-python@v5
258+
# with:
259+
# python-version: "3.10"
260260

261-
- name: Run e2e tests
262-
run: |
263-
cd engine
264-
python -m pip install --upgrade pip
265-
python -m pip install -r e2e-test/requirements.txt
266-
pytest e2e-test/test_api_docker.py
261+
# - name: Run e2e tests
262+
# run: |
263+
# cd engine
264+
# python -m pip install --upgrade pip
265+
# python -m pip install -r e2e-test/requirements.txt
266+
# pytest e2e-test/test_api_docker.py
267267

268-
- name: Run Docker
269-
continue-on-error: true
270-
if: always()
271-
run: |
272-
docker logs cortex
273-
docker stop cortex
274-
docker rm cortex
275-
echo "y\n" | docker system prune -af
268+
# - name: Run Docker
269+
# continue-on-error: true
270+
# if: always()
271+
# run: |
272+
# docker logs cortex
273+
# docker stop cortex
274+
# docker rm cortex
275+
# echo "y\n" | docker system prune -af

engine/e2e-test/main-harry.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import pytest
2+
import sys
3+
from test_api_engine import TestApiEngine
4+
5+
if __name__ == "__main__":
6+
sys.exit(pytest.main([__file__, "-v"]))

engine/e2e-test/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ websockets
22
pytest
33
pytest-asyncio
44
requests
5-
pyyaml
5+
pyyaml
6+
jsonschema

0 commit comments

Comments
 (0)