Skip to content

Commit

Permalink
Remove cloud tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahuei committed Nov 20, 2024
1 parent 2706b68 commit b88bd69
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,79 +170,6 @@ jobs:
if: failure() && steps.python_sdk_test_oss_file.outcome == 'failure'
run: docker exec jamai-owl-1 cat /app/api/logs/owl.log

- name: Reset repo and edit env file
if: always()
run: |
set -e
git reset --hard
sudo rm -rf db
sudo rm -rf logs
mv .env.example .env
ORGS=$(printenv | grep API_KEY | xargs -I {} echo {} | cut -d '=' -f 1)
KEYS=$(printenv | grep API_KEY | xargs -I {} echo {} | cut -d '=' -f 2-)
# Convert them into arrays
ORG_ARRAY=($ORGS)
KEY_ARRAY=($KEYS)
# Loop through the ORG_ARRAY
for i in "${!ORG_ARRAY[@]}"; do
# Get the org and key
org="${ORG_ARRAY[$i]}"
key="${KEY_ARRAY[$i]}"
# Replace the org with the key in the .env file
sed -i "s/$org=.*/$org=$key/g" .env
done
echo 'SERVICE_KEY=lalala' >> .env
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
HYPERBOLIC_API_KEY: ${{ secrets.HYPERBOLIC_API_KEY }}

- name: Launch services (Cloud)
id: launch_cloud
timeout-minutes: 20
run: |
set -e
docker compose -p jamai -f docker/compose.cpu.yml up --quiet-pull -d --wait --no-deps --build --force-recreate owl
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1

- name: Install owl
run: |
set -e
cd services/api
python -m pip install .[all]
- name: Python SDK tests (Cloud)
id: python_sdk_test_cloud
if: always() && steps.launch_cloud.outcome == 'success'
run: |
export JAMAI_API_BASE=http://localhost:6969/api
export JAMAI_API_KEY=lalala
python -m pytest -vv --doctest-modules --no-flaky-report clients/python/tests/cloud
- name: Inspect owl logs if Python SDK tests failed
if: failure() && steps.python_sdk_test_cloud.outcome == 'failure'
run: docker exec jamai-owl-1 cat /app/api/logs/owl.log

- name: TS/JS SDK tests (Cloud)
id: ts_sdk_test_cloud
if: always() && steps.launch_cloud.outcome == 'success'
run: |
cd clients/typescript
echo "BASEURL=http://localhost:6969" >> __tests__/.env
echo "JAMAI_API_KEY=lalala" >> __tests__/.env
npm install
npm run test
- name: Inspect owl logs if TS/JS SDK tests failed
if: failure() && steps.ts_sdk_test_cloud.outcome == 'failure'
run: docker exec jamai-owl-1 cat /app/api/logs/owl.log

lance_tests:
name: Lance tests
runs-on: ubuntu-latest
Expand Down

0 comments on commit b88bd69

Please sign in to comment.