-
Notifications
You must be signed in to change notification settings - Fork 250
test: add automated testing runner and matrix #3440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # ============================================================================= | ||
| # Gleec QA Automation — Environment Configuration | ||
| # ============================================================================= | ||
| # Copy this file to .env and fill in values for your environment. | ||
| # | ||
| # PLATFORM NOTES: | ||
| # Linux: Ollama runs natively. Use http://host.docker.internal:11434 | ||
| # Windows: Run Ollama natively on Windows (best GPU perf). | ||
| # Run this runner + Docker inside WSL2. | ||
| # Ollama URL from WSL2/Docker: http://host.docker.internal:11434 | ||
| # (Docker Desktop shares ports between Windows and WSL2 automatically) | ||
| # ============================================================================= | ||
|
|
||
| # --- Skyvern + Ollama integration --- | ||
| ENV=local | ||
| ENABLE_OLLAMA=true | ||
| LLM_KEY=OLLAMA | ||
| OLLAMA_SERVER_URL=http://host.docker.internal:11434 | ||
| OLLAMA_MODEL=qwen2.5-vl:32b | ||
| OLLAMA_SUPPORTS_VISION=true | ||
|
|
||
| # --- Database (managed by Docker Compose) --- | ||
| DATABASE_STRING=postgresql+psycopg://skyvern:skyvern@postgres:5432/skyvern | ||
|
|
||
| # --- Browser --- | ||
| BROWSER_TYPE=chromium-headful | ||
| VIDEO_PATH=/app/videos | ||
| BROWSER_ACTION_TIMEOUT_MS=10000 | ||
| MAX_STEPS_PER_RUN=50 | ||
|
|
||
| # --- Skyvern server --- | ||
| LOG_LEVEL=INFO | ||
| PORT=8000 | ||
|
|
||
| # --- Runner configuration (read by runner.py, not by Docker) --- | ||
| # APP_BASE_URL=https://app.gleecwallet.com | ||
| # OLLAMA_URL=http://localhost:11434 | ||
| # SKYVERN_URL=http://localhost:8000 | ||
| # VRAM_MIN_GB=15 | ||
| # DEFAULT_RETRIES=3 | ||
| # CRITICAL_RETRIES=5 |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # ============================================================================= | ||
| # Gleec QA Automation — CI Pipeline | ||
| # ============================================================================= | ||
| # Exit codes: | ||
| # 0 = all tests passed | ||
| # 1 = test failures or errors | ||
| # 2 = pre-flight / infrastructure failure | ||
| # 3 = all passed but some flaky | ||
| # ============================================================================= | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| cd "$SCRIPT_DIR" | ||
|
|
||
| MATRIX="${MATRIX:-test_matrix.yaml}" | ||
| ARTIFACTS_DIR="${CI_ARTIFACTS_DIR:-results}" | ||
|
|
||
| echo "=== Gleec QA CI Pipeline ===" | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Infrastructure | ||
| # --------------------------------------------------------------------------- | ||
| echo "[infra] Verifying Ollama..." | ||
| if ! curl -sf http://localhost:11434/api/tags > /dev/null 2>&1; then | ||
| echo "[infra] Starting Ollama..." | ||
| ollama serve & | ||
| sleep 5 | ||
| fi | ||
|
|
||
| echo "[infra] Starting Docker stack..." | ||
| docker compose up -d | ||
| sleep 10 | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Smoke gate (fast, blocks deployment on failure) | ||
| # --------------------------------------------------------------------------- | ||
| echo "[smoke] Running smoke gate..." | ||
| python -m runner.runner --matrix "$MATRIX" --tag smoke --single | ||
| SMOKE_EXIT=$? | ||
|
|
||
| if [ $SMOKE_EXIT -eq 2 ]; then | ||
| echo "[smoke] INFRASTRUCTURE FAILURE — aborting pipeline" | ||
| exit 2 | ||
| fi | ||
|
|
||
| if [ $SMOKE_EXIT -eq 1 ]; then | ||
| echo "[smoke] SMOKE GATE FAILED — blocking deployment" | ||
| # Copy whatever reports exist | ||
| cp results/run_*/report.html "$ARTIFACTS_DIR/" 2>/dev/null || true | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "[smoke] Smoke gate passed (exit=$SMOKE_EXIT)" | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Full suite (with retries and majority vote) | ||
| # --------------------------------------------------------------------------- | ||
| echo "[full] Running full automated suite..." | ||
| python -m runner.runner --matrix "$MATRIX" | ||
| FULL_EXIT=$? | ||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # Collect artifacts | ||
| # --------------------------------------------------------------------------- | ||
| echo "[artifacts] Collecting reports..." | ||
| mkdir -p "$ARTIFACTS_DIR" | ||
|
|
||
| LATEST_RUN=$(ls -td results/run_* 2>/dev/null | head -1) | ||
| if [ -n "$LATEST_RUN" ]; then | ||
| cp "$LATEST_RUN/report.html" "$ARTIFACTS_DIR/" 2>/dev/null || true | ||
| cp "$LATEST_RUN/results.json" "$ARTIFACTS_DIR/" 2>/dev/null || true | ||
| fi | ||
|
|
||
| echo "[done] Pipeline complete (exit=$FULL_EXIT)" | ||
| exit $FULL_EXIT | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| services: | ||
| postgres: | ||
| image: postgres:15 | ||
| environment: | ||
| POSTGRES_USER: skyvern | ||
| POSTGRES_PASSWORD: skyvern | ||
| POSTGRES_DB: skyvern | ||
| volumes: | ||
| - pgdata:/var/lib/postgresql/data | ||
| ports: | ||
| - "5432:5432" | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U skyvern"] | ||
| interval: 5s | ||
| retries: 5 | ||
|
|
||
| skyvern: | ||
| image: ghcr.io/skyvern-ai/skyvern:latest | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| ports: | ||
| - "8000:8000" | ||
| env_file: | ||
| - .env | ||
| extra_hosts: | ||
| - "host.docker.internal:host-gateway" | ||
| volumes: | ||
| - ./results/videos:/app/videos | ||
| - ./results/screenshots:/app/artifacts | ||
|
|
||
| volumes: | ||
| pgdata: |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
set -euo pipefailenabled, this command exits the script immediately on any non-zero status, so the later$SMOKE_EXIT/$FULL_EXITbranching and artifact collection logic does not run on failures. In practice, smoke/full failures bypass the script’s documented exit-code handling and can skip report copying, reducing CI diagnosability.Useful? React with 👍 / 👎.