Skip to content

Guard the bare-Linux startup path in CI #578

Description

@chinmayajha

optics --version failed outright on a clean ubuntu:24.04:

ImportError: libxcb.so.1: cannot open shared object file: No such file or directory

#577 fixes it by depending on opencv-python-headless, but nothing in the test suite would catch a regression. The unit tests all run in an environment that already has the system libraries, so the dependency could be switched back — or another dependency could grow a native link — and CI would stay green while every Docker and CI user is broken on first command.

The bug was found by running the CLI in a container by hand. That check should not depend on someone thinking to do it again.

Suggested

A smoke job that installs the built wheel into a bare image and runs the CLI:

- run: docker run --rm -v "$PWD/dist:/wheels:ro" ubuntu:24.04 sh -c '
    apt-get update -qq && apt-get install -y -qq python3 python3-venv &&
    python3 -m venv /v && /v/bin/pip install -q /wheels/*.whl &&
    /v/bin/optics --version && /v/bin/optics list > /dev/null'

No apt-get install of graphics libraries — that absence is the assertion.

Worth running on python:3.12-slim too, which is what most projects actually base on.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions