Skip to content

Update dorking.md

Update dorking.md #20

name: Daily Branch Health Check
on:
push:
branches: [rolling]
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
jobs:
branch-health-check:
name: Health check (${{ matrix.branch }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: [main, rolling]
steps:
- name: Checkout target branch
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Print branch info
run: |
echo "========================================"
echo "Starting daily health check"
echo "Branch: ${{ matrix.branch }}"
echo "Runner: $(uname -a)"
echo "Time (UTC): $(date -u)"
echo "========================================"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install Python 3.11
run: uv python install 3.11
- name: Show uv and Python versions
run: |
echo "uv version:"
uv --version
echo ""
echo "Installed Python versions:"
uv python list
- name: Sync project dependencies (including dev)
run: uv sync --group dev
- name: Validate Python syntax
run: uv run python -m compileall .
- name: Sanity check project import
run: uv run python -c "import dpulse; print('dpulse import ok')"
- name: Optional dependency structure check (deptry)
continue-on-error: true
run: uv run --group dev deptry . --ignore-notebooks
- name: Print native environment success message
run: |
echo "========================================"
echo "Native environment check passed"
echo "Branch: ${{ matrix.branch }}"
echo "- uv is installed"
echo "- Python 3.11 is available"
echo "- Dependencies are synced"
echo "- Python files compile successfully"
echo "- Project import works"
echo "========================================"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build multi-platform Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
platforms: linux/amd64,linux/arm64
tags: dpulse:${{ matrix.branch }}-daily
- name: Build local Docker image for smoke tests
uses: docker/build-push-action@v6
with:
context: .
push: false
load: true
tags: dpulse:${{ matrix.branch }}-local
- name: Print Docker success message
run: |
echo "========================================"
echo "Docker environment check passed"
echo "Branch: ${{ matrix.branch }}"
echo "- Docker image builds successfully"
echo "- Multi-platform build completed"
echo "- Python works inside container"
echo "- Project import works inside container"
echo "========================================"
- name: Final branch health summary
run: |
echo "========================================"
echo "DAILY HEALTH CHECK COMPLETED SUCCESSFULLY"
echo "Branch: ${{ matrix.branch }}"
echo ""
echo "Result summary:"
echo "✓ uv installation works"
echo "✓ Python 3.11 installation works"
echo "✓ Dependency synchronization works"
echo "✓ Python source code compiles"
echo "✓ Native project import works"
echo "✓ Docker image builds successfully"
echo "✓ Docker smoke tests pass"
echo ""
echo "Overall status: HEALTHY"
echo "========================================"