Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves committed Feb 16, 2025
1 parent ee27da0 commit ed67e94
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pr-integration-tests-parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,47 @@ jobs:
echo "All integration tests passed successfully."
fi
- name: Collect log files
if: success() || failure()
run: |
# Create a directory for logs
mkdir -p ${{ github.workspace }}/logs
mkdir -p ${{ github.workspace }}/logs/shared_services
# Copy all relevant log files
cp /tmp/api_server_*.txt ${{ github.workspace }}/logs/ || true
cp /tmp/background_*.txt ${{ github.workspace }}/logs/ || true
cp /tmp/shared_model_server.txt ${{ github.workspace }}/logs/ || true
# Collect logs from shared services (Docker containers)
# Note: using a wildcard for the UUID part of the stack name
docker ps -a --filter "name=base-onyx-" --format "{{.Names}}" | while read container; do
echo "Collecting logs from $container"
docker logs $container > "${{ github.workspace }}/logs/shared_services/${container}.log" 2>&1 || true
done
# Also collect Redis container logs
docker ps -a --filter "name=redis-onyx-" --format "{{.Names}}" | while read container; do
echo "Collecting logs from $container"
docker logs $container > "${{ github.workspace }}/logs/shared_services/${container}.log" 2>&1 || true
done
# List collected logs
echo "Collected log files:"
ls -l ${{ github.workspace }}/logs/
echo "Collected shared services logs:"
ls -l ${{ github.workspace }}/logs/shared_services/
- name: Upload logs
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: integration-test-logs
path: |
${{ github.workspace }}/logs/
${{ github.workspace }}/logs/shared_services/
retention-days: 5

# save before stopping the containers so the logs can be captured
# - name: Save Docker logs
# if: success() || failure()
Expand Down
8 changes: 4 additions & 4 deletions backend/tests/integration/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ def worker(


def main() -> None:
NUM_INSTANCES = 6
NUM_INSTANCES = 1

# Get all tests
tests = list_all_tests(Path(__file__).parent)
print(f"Found {len(tests)} tests to run")

# For debugging
# tests = [test for test in tests if "openai_assistants_api" in test]
# tests = tests[:2]
# print(f"Running {len(tests)} tests")
tests = [test for test in tests if "openai_assistants_api" in test]
tests = tests[:2]
print(f"Running {len(tests)} tests")

# Start all instances at once
shared_services_config, deployment_configs = run_x_instances(NUM_INSTANCES)
Expand Down

0 comments on commit ed67e94

Please sign in to comment.