CI: use the ci-fairy image and a venv for the black job

The venv is needed now because black now requires a newer 'packaging'
and fails to installed with:
   ERROR: Cannot uninstall 'packaging'. It is a distutils installed
   project and thus we cannot accurately determine which files belong to
   it which would lead to only a partial uninstall.

So let's use a venv and while we're doing this switch to use the
ci-fairy image so we don't need to worry about docker limits.
This commit is contained in:
Peter Hutterer 2023-02-15 09:12:29 +10:00
parent fe337d9866
commit 90f450787a
2 changed files with 10 additions and 4 deletions

View file

@ -129,10 +129,13 @@ check-merge-request:
# Format anything python with python-black
#
python-black:
image: golang:alpine
extends:
- .fdo.ci-fairy
stage: prep
before_script:
- apk add python3 py-pip black
- python3 -m venv venv
- source venv/bin/activate
- pip3 install black
script:
- black --check --diff .

View file

@ -139,10 +139,13 @@ check-merge-request:
# Format anything python with python-black
#
python-black:
image: golang:alpine
extends:
- .fdo.ci-fairy
stage: prep
before_script:
- apk add python3 py-pip black
- python3 -m venv venv
- source venv/bin/activate
- pip3 install black
script:
- black --check --diff .