Skip to content

Commit

Permalink
ci: Install coverage with apt
Browse files Browse the repository at this point in the history
Modern Python versions complain bitterly if you try to use pip from the
system installation to install additional libraries:

    error: externally-managed-environment

    × This environment is externally managed
    ╰─> To install Python packages system-wide, try apt install
        python3-xyz, where xyz is the package you are trying to
        install.

        If you wish to install a non-Debian-packaged Python package,
        create a virtual environment using python3 -m venv path/to/venv.
        Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
        sure you have python3-full installed.

        If you wish to install a non-Debian packaged Python application,
        it may be easiest to use pipx install xyz, which will manage a
        virtual environment for you. Make sure you have pipx installed.

        See /usr/share/doc/python3.11/README.venv for more information.

    note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
    hint: See PEP 668 for the detailed specification.
  • Loading branch information
wjt committed Nov 8, 2023
1 parent 0664a93 commit 3adde82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Run tests in container
run: |
docker run -v $PWD:$PWD -w $PWD --entrypoint bash ${{ env.DOCKER_IMAGE }}:build -c \
"pip3 install coverage && python3 -m coverage run -m unittest discover --verbose --buffer"
"apt-get install python3-coverage && python3 -m coverage run -m unittest discover --verbose --buffer"
- name: Submit code coverage to Coveralls.io
env:
Expand Down

0 comments on commit 3adde82

Please sign in to comment.