feat: align xarf-python with XARF v4 spec and JavaScript reference #27
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] | |
| permissions: | |
| contents: read | |
| jobs: | |
| version-checks: | |
| name: Python ${{ matrix.python-version }} Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,test]" | |
| - name: Run tests | |
| run: pytest --cov=xarf --cov-report=term -v tests/ | |
| - name: Upload coverage | |
| if: matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| fail_ci_if_error: false | |
| code-quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev,test]" | |
| - name: Lint (ruff) | |
| run: ruff check . --output-format=github | |
| - name: Format (ruff) | |
| run: ruff format --check . | |
| - name: Types (mypy) | |
| run: mypy --strict xarf/ | |
| - name: Docstrings (pydocstyle) | |
| run: pydocstyle xarf/ | |
| - name: Dead code (vulture) | |
| run: vulture xarf/ .vulture_whitelist.py --min-confidence 80 | |
| - name: Complexity (radon) | |
| run: radon cc xarf/ -a -nb | |
| - name: Maintainability (radon) | |
| run: radon mi xarf/ -nb |