fix(context): expand snippet window by 1 line each side #5
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", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Check syntax | |
| run: python -m py_compile yodacheck.py examples/example.py | |
| - name: Run tests | |
| run: python -m unittest discover -s tests -v | |
| - name: Smoke test — detect issues in examples/example.py | |
| run: | | |
| output=$(python yodacheck.py examples/example.py --format plain) | |
| count=$(echo "$output" | grep -c "→" || true) | |
| echo "Detected $count issues" | |
| [ "$count" -ge 15 ] || { echo "Expected ≥15 issues, got $count"; exit 1; } | |
| - name: Smoke test — self-scan (checker must be Yoda-free) | |
| run: | | |
| output=$(python yodacheck.py yodacheck.py --format plain) | |
| count=$(echo "$output" | grep -c "→" || true) | |
| echo "Issues in yodacheck.py: $count" | |
| [ "$count" -eq 0 ] || { echo "yodacheck.py has yoda issues!"; echo "$output"; exit 1; } |