mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
ci: Fix the failing run-lint step
Fix the failing run-lint test by switching to Debian Bookworm for this step, and installing Poetry 1.2.2 from the official repos. This way, we circumvent a bug [1] in Poetry 1.3 (released on PyPI) and we greatly simplify this step [2]. [1]: https://github.com/python-poetry/poetry/issues/7184 [2]: https://github.com/freedomofpress/dangerzone/issues/292#issuecomment-1351368122
This commit is contained in:
parent
e5ec5a279c
commit
06f92747ab
1 changed files with 5 additions and 9 deletions
|
@ -70,25 +70,21 @@ aliases:
|
||||||
jobs:
|
jobs:
|
||||||
run-lint:
|
run-lint:
|
||||||
docker:
|
docker:
|
||||||
- image: debian:bullseye
|
- image: debian:bookworm
|
||||||
resource_class: small
|
resource_class: small
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Install dev. dependencies
|
name: Install dev. dependencies
|
||||||
|
# Install only the necessary packages to run our linters.
|
||||||
command: |
|
command: |
|
||||||
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
|
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y make python3 python3-pip python3-venv
|
apt-get install -y make python3 python3-poetry --no-install-recommends
|
||||||
python3 -m venv .venv
|
poetry install --only lint
|
||||||
source .venv/bin/activate
|
|
||||||
pip install poetry
|
|
||||||
poetry install # FIXME --dev-only once poetry 1.2.0 is out https://github.com/python-poetry/poetry/issues/2572
|
|
||||||
- run:
|
- run:
|
||||||
name: Run linters to enforce code style
|
name: Run linters to enforce code style
|
||||||
command: |
|
command: poetry run make lint
|
||||||
source .venv/bin/activate
|
|
||||||
make lint
|
|
||||||
|
|
||||||
build-container-image:
|
build-container-image:
|
||||||
working_directory: /app
|
working_directory: /app
|
||||||
|
|
Loading…
Reference in a new issue