Skip to content

First commit

First commit #1

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9","3.10","3.11","3.12","3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install package + dev deps
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Lint (ruff)
run: |
ruff --version
ruff check can_waveshare tests --output-format=github || true
- name: Run tests
run: pytest -q
- name: Verify entry point is discoverable
run: |
python - <<'PY'
import importlib.metadata as md, can
eps = md.entry_points().select(group='can.interface')
names = {ep.name for ep in eps}
assert 'waveshare' in names, names
cls = [ep for ep in eps if ep.name == 'waveshare'][0].load()
assert issubclass(cls, can.BusABC), cls
print("Entry point present and loadable:", cls)
PY
- name: Build sdist & wheel
run: |
python -m pip install --upgrade build
python -m build
- name: Check install from wheel
run: |
pip install --force-reinstall --no-deps dist/*.whl
python - <<'PY'
import importlib.metadata as md, can
eps = md.entry_points().select(group='can.interface')
assert any(ep.name=='waveshare' for ep in eps), eps
print("Installed wheel exposes entry point OK.")
PY