Merge pull request #4 from OpenCodeIntel/feat/cli-personality #96
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: | |
| branches: [main] | |
| jobs: | |
| # Lint runs once -- no point running ruff 12 times across the matrix | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Lint | |
| run: ruff check saar/ tests/ | |
| # Tests run across all supported Python versions and OS | |
| test: | |
| needs: lint | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Show tree-sitter version | |
| run: pip show tree-sitter tree-sitter-python tree-sitter-javascript | |
| - name: Test | |
| run: pytest tests/ -q --tb=short | |
| # Install from wheel + dogfood: saar must extract itself cleanly | |
| install-test: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Build wheel | |
| run: | | |
| pip install build | |
| python -m build | |
| - name: Install from wheel | |
| run: pip install dist/*.whl | |
| - name: Smoke test CLI | |
| run: | | |
| saar --version | |
| saar extract . --format markdown --no-interview | |
| - name: Dogfood -- saar must extract itself with no stale warnings | |
| run: | | |
| saar extract . --no-interview | |
| saar lint . && echo "lint clean" || echo "lint violations found (non-blocking)" | |
| saar stats . 2>&1 | grep -E "100/100|No improvements" |