Skip to content

Add nebius as a cloud provider #1290

Add nebius as a cloud provider

Add nebius as a cloud provider #1290

name: CLI Live API Server Tests
on:
push:
branches: ["main"]
paths:
- "cli/**"
- "api/**"
- "lab-sdk/**"
- ".github/workflows/pytest-cli-live-server.yml"
pull_request:
branches: ["main"]
paths:
- "cli/**"
- "api/**"
- "lab-sdk/**"
- ".github/workflows/pytest-cli-live-server.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
cli-live-routes:
runs-on: ubuntu-latest
timeout-minutes: 35
defaults:
run:
working-directory: api
env:
AUTH_CLIENT_ID: ${{ secrets.AUTH_CLIENT_ID }}
AUTH_API_KEY: ${{ secrets.AUTH_API_KEY }}
FRONTEND_URL: http://localhost:8338
AUTH_SUCCESS_REDIRECT_URL: /
AUTH_ERROR_REDIRECT_URL: /
AUTH_LOGOUT_REDIRECT_URL: /
TRANSFORMERLAB_JWT_SECRET: ${{ secrets.TRANSFORMERLAB_JWT_SECRET }}
TRANSFORMERLAB_REFRESH_SECRET: ${{ secrets.TRANSFORMERLAB_REFRESH_SECRET }}
EMAIL_METHOD: "dev"
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install API dependencies
run: |
pip install uv
uv pip install --system pytest pytest-asyncio jsonschema requests httpx
# Minimal api/pyproject.toml only; drop SDK pin so ../lab-sdk editable install wins
sed -i.bak '/^ "transformerlab==/d' pyproject.toml
uv pip install --system .
mv pyproject.toml.bak pyproject.toml || true
- name: Install lab-sdk in editable mode
run: |
cd ../lab-sdk
uv pip install --system -e .
- name: Install CLI test dependencies
run: |
cd ../cli
uv pip install --system -e .
uv pip install --system pytest
- name: Install webapp static files
run: |
set -e
TLAB_DIR="${HOME}/.transformerlab"
TLAB_STATIC_WEB_DIR="${TLAB_DIR}/webapp"
TLAB_APP_URL="https://github.com/transformerlab/transformerlab-app/releases/latest/download/transformerlab_web.tar.gz"
mkdir -p "${TLAB_DIR}"
rm -rf "${TLAB_STATIC_WEB_DIR}"
mkdir -p "${TLAB_STATIC_WEB_DIR}"
curl -L --fail "${TLAB_APP_URL}" -o /tmp/transformerlab_web.tar.gz
tar -xzf /tmp/transformerlab_web.tar.gz -C "${TLAB_STATIC_WEB_DIR}"
if [ -d "${TLAB_STATIC_WEB_DIR}/transformerlab_web" ]; then
mv "${TLAB_STATIC_WEB_DIR}/transformerlab_web/"* "${TLAB_STATIC_WEB_DIR}/" 2>/dev/null || true
rmdir "${TLAB_STATIC_WEB_DIR}/transformerlab_web" 2>/dev/null || true
fi
rm -f /tmp/transformerlab_web.tar.gz
- name: Start API server and wait for ready
run: |
./run.sh -c > /tmp/api-server.log 2>&1 &
python scripts/wait_for_server.py --timeout 120 --interval 2
- name: Print API server logs on failure
if: failure()
run: |
echo "===== API SERVER LOGS ====="
cat /tmp/api-server.log || true
- name: Run live CLI route-contract smoke test
env:
TLAB_RUN_LIVE_SERVER_TESTS: "1"
TLAB_LIVE_SERVER_URL: "http://127.0.0.1:8338"
run: |
cd ../cli
uv run pytest tests/integration/test_live_cli_routes.py -v