name: CI on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Lint with ruff run: | pip install ruff ruff check . --exclude scripts/probe_*.py,scripts/test_*.py - name: Run unit tests run: | pip install pytest pytest tests/ -v --ignore=tests/e2e --ignore=tests/playwright - name: Validate dataset exists run: | python -c "from pathlib import Path; assert Path('data/retro-alpha-final.jsonl').exists(), 'Final dataset missing'" deploy-check: runs-on: ubuntu-latest needs: test if: github.ref == 'refs/heads/main' steps: - name: Checkout code uses: actions/checkout@v4 - name: Verify Space readiness env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | pip install huggingface_hub python -c "from huggingface_hub import HfApi; api = HfApi(token='$HF_TOKEN'); print('HF authenticated')"