Compare commits
9
Commits
dev
..
709e14fdac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
709e14fdac | ||
|
|
a85a931133 | ||
|
|
a87aca36b8 | ||
|
|
3c38855045 | ||
|
|
0cf9e7d8ce | ||
|
|
717384ebfc | ||
|
|
22346b5748 | ||
|
|
4356b9b672 | ||
|
|
ba5d747371 |
No files matched your search
@@ -47,12 +47,6 @@ jobs:
|
|||||||
if: env.COOLIFY_WEBHOOK_URL != ''
|
if: env.COOLIFY_WEBHOOK_URL != ''
|
||||||
env:
|
env:
|
||||||
COOLIFY_WEBHOOK_URL: ${{ secrets.COOLIFY_WEBHOOK_URL }}
|
COOLIFY_WEBHOOK_URL: ${{ secrets.COOLIFY_WEBHOOK_URL }}
|
||||||
COOLIFY_API_TOKEN: ${{ secrets.COOLIFY_API_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
echo "==> Triggering Coolify deployment webhook..."
|
echo "==> Triggering Coolify deployment webhook..."
|
||||||
if [ -n "${COOLIFY_API_TOKEN:-}" ]; then
|
curl -fsSL -X POST "$COOLIFY_WEBHOOK_URL" || echo "Webhook trigger skipped or failed"
|
||||||
curl -fsSL -X POST -H "Authorization: Bearer $COOLIFY_API_TOKEN" "$COOLIFY_WEBHOOK_URL" || echo "Webhook trigger failed"
|
|
||||||
else
|
|
||||||
curl -fsSL -X POST "$COOLIFY_WEBHOOK_URL" || echo "Webhook trigger failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
@@ -1,75 +1,10 @@
|
|||||||
name: CI Health Check & Quality Gate
|
# .gitea/workflows/test.yml
|
||||||
|
name: test
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- dev
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
healthcheck:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Code, dbt & Live App Health Check
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
- run: node --version
|
||||||
|
|
||||||
- name: Install System Dependencies
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y curl unzip git ca-certificates
|
|
||||||
|
|
||||||
- name: Install uv
|
|
||||||
run: |
|
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
||||||
echo "/root/.local/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Install Project Dependencies
|
|
||||||
run: |
|
|
||||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
|
||||||
uv sync
|
|
||||||
|
|
||||||
- name: Python Syntax & Compilation Verification
|
|
||||||
run: |
|
|
||||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
|
||||||
echo "==> Validating Python scripts compilation..."
|
|
||||||
uv run python -m py_compile streamlit_app/app.py scripts/db_storage.py
|
|
||||||
echo "✓ Python scripts compiled without errors"
|
|
||||||
|
|
||||||
- name: dbt Manifest & Model Validation
|
|
||||||
run: |
|
|
||||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
|
||||||
echo "==> Validating dbt package dependencies..."
|
|
||||||
uv run dbt deps --project-dir dbt_nba --profiles-dir dbt_nba
|
|
||||||
echo "==> Validating dbt models, seeds, and tests compilation..."
|
|
||||||
uv run dbt parse --project-dir dbt_nba --profiles-dir dbt_nba
|
|
||||||
echo "✓ All dbt models, seeds, and macros validated"
|
|
||||||
|
|
||||||
- name: Cloudflare R2 Storage Probe (Optional if secrets present)
|
|
||||||
env:
|
|
||||||
S3_ENDPOINT_URL: ${{ secrets.S3_ENDPOINT_URL }}
|
|
||||||
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
|
|
||||||
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
|
|
||||||
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
|
|
||||||
S3_REGION: ${{ secrets.S3_REGION || 'auto' }}
|
|
||||||
S3_DB_KEY: ${{ secrets.S3_DB_KEY || 'dbt_nba.duckdb' }}
|
|
||||||
run: |
|
|
||||||
export PATH="$HOME/.local/bin:/root/.local/bin:$PATH"
|
|
||||||
if [ -n "${S3_ENDPOINT_URL:-}" ]; then
|
|
||||||
echo "==> Probing Cloudflare R2 storage status..."
|
|
||||||
uv run python scripts/db_storage.py status
|
|
||||||
else
|
|
||||||
echo "==> S3 secrets not configured for this step; skipping storage probe."
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Live Production App Health Probe
|
|
||||||
run: |
|
|
||||||
echo "==> Probing production endpoint https://streamlit.turbo-data.com/_stcore/health..."
|
|
||||||
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://streamlit.turbo-data.com/_stcore/health || echo "000")
|
|
||||||
if [ "$HTTP_STATUS" = "200" ]; then
|
|
||||||
echo "✓ Production Streamlit dashboard is healthy (HTTP $HTTP_STATUS)"
|
|
||||||
else
|
|
||||||
echo "⚠️ Production health check returned HTTP $HTTP_STATUS (may still be starting or initializing)"
|
|
||||||
fi
|
|
||||||
Reference in new issue
Block a user