PR 5.1: Kaggle release packager + cover image #208
Workflow file for this run
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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint & format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install ruff | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| typecheck: | |
| name: Type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev]" | |
| - run: mypy leadforge/ | |
| test: | |
| name: Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| env: | |
| COVERAGE_FILE: .coverage.${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install -e ".[dev]" pytest-cov | |
| - run: pytest --cov=leadforge --cov-report=term-missing | |
| - name: Upload coverage artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-agent-context-coverage-py${{ matrix.python-version }} | |
| path: .coverage.${{ matrix.python-version }} | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| validate-dataset: | |
| name: Validate lead scoring dataset | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,scripts]" | |
| - name: Check for v5 dataset | |
| id: check-v5 | |
| run: | | |
| if [ -f "lead_scoring_intro_v5.csv" ]; then | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| echo "csv=lead_scoring_intro_v5.csv" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run v5 validator | |
| if: steps.check-v5.outputs.found == 'true' | |
| run: python scripts/validate_lead_scoring_dataset.py --csv "${{ steps.check-v5.outputs.csv }}" --enforce-1000 | |
| - name: Skip v5 (no dataset) | |
| if: steps.check-v5.outputs.found != 'true' | |
| run: echo "No lead_scoring_intro_v5.csv found in repo root — skipping v5 validation" | |
| validate-dataset-v6: | |
| name: Validate v6 lead scoring dataset | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,scripts]" | |
| - name: Check for v6 datasets | |
| id: check-v6 | |
| run: | | |
| STUDENT="lead_scoring_intro/lead_scoring_intro_v6.csv" | |
| INSTRUCTOR="lead_scoring_intro/lead_scoring_intro_v6_instructor.csv" | |
| if [ -f "$STUDENT" ] && [ -f "$INSTRUCTOR" ]; then | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| echo "student=$STUDENT" >> "$GITHUB_OUTPUT" | |
| echo "instructor=$INSTRUCTOR" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run v6 validator | |
| if: steps.check-v6.outputs.found == 'true' | |
| run: python scripts/validate_v6_dataset.py "${{ steps.check-v6.outputs.student }}" "${{ steps.check-v6.outputs.instructor }}" | |
| - name: Skip v6 (no dataset) | |
| if: steps.check-v6.outputs.found != 'true' | |
| run: echo "No v6 datasets found — skipping v6 validation" | |
| validate-dataset-v7: | |
| name: Validate v7 lead scoring dataset | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install -e ".[dev,scripts]" | |
| - name: Check for v7 datasets | |
| id: check-v7 | |
| run: | | |
| STUDENT="lead_scoring_intro/lead_scoring_intro_v7.csv" | |
| INSTRUCTOR="lead_scoring_intro/lead_scoring_intro_v7_instructor.csv" | |
| if [ -f "$STUDENT" ] && [ -f "$INSTRUCTOR" ]; then | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| echo "student=$STUDENT" >> "$GITHUB_OUTPUT" | |
| echo "instructor=$INSTRUCTOR" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run v7 validator | |
| if: steps.check-v7.outputs.found == 'true' | |
| run: python scripts/validate_v7_dataset.py "${{ steps.check-v7.outputs.student }}" "${{ steps.check-v7.outputs.instructor }}" | |
| - name: Skip v7 (no dataset) | |
| if: steps.check-v7.outputs.found != 'true' | |
| run: echo "No v7 datasets found — skipping v7 validation" |