Skip to content

feat: align xarf-python with XARF v4 spec and JavaScript reference #27

feat: align xarf-python with XARF v4 spec and JavaScript reference

feat: align xarf-python with XARF v4 spec and JavaScript reference #27

Workflow file for this run

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