From bcd3e8961422985d692e947bf9285c40a1de7875 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 8 Jun 2021 17:15:06 +0200 Subject: [PATCH 1/2] gitlab-ci: fix whitespace --- .gitlab-ci.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 149b34f9..3a004d07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ variables: pip: pip3 --timeout 100 --retries 10 -# speed up git checkout phase + # speed up git checkout phase GIT_DEPTH: 1 @@ -133,7 +133,7 @@ ubuntu_bionic_pip: - deactivate - tar tzf dist/fdroidserver-*.tar.gz | grep locale/de/LC_MESSAGES/fdroidserver.mo # back to bare machine to act as user's install machine - - $pip install --upgrade pip setuptools wheel # make this go away: "error: invalid command 'bdist_wheel'" + - $pip install --upgrade pip setuptools wheel # make this go away: "error: invalid command 'bdist_wheel'" - $pip install dist/fdroidserver-*.tar.gz - tar xzf dist/fdroidserver-*.tar.gz - cd fdroidserver-* @@ -360,7 +360,7 @@ plugin_fetchsrclibs: - . env/bin/activate - export PATH="$CI_PROJECT_DIR:$PATH" - export PYTHONPATH="$CI_PROJECT_DIR/examples" - - $pip install wheel # to make this go away: "error: invalid command 'bdist_wheel'" + - $pip install wheel # to make this go away: "error: invalid command 'bdist_wheel'" - $pip install -e . - fdroid | grep fetchsrclibs @@ -421,20 +421,21 @@ Build documentation: - pip install -e .[docs] - cd docs - sphinx-apidoc -o ./source ../fdroidserver -M -e - - sphinx-autogen -o generated source/*.rst + - sphinx-autogen -o generated source/*.rst - make html artifacts: paths: - docs/build/html/ + pages: image: alpine:latest stage: deploy script: - - cp docs/build/html public -r # GL Pages needs the files in a directory named "public" + - cp docs/build/html public -r # GL Pages needs the files in a directory named "public" artifacts: paths: - public needs: ["Build documentation"] rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # only publish pages on default (master) branch \ No newline at end of file + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # only publish pages on default (master) branch From ac86a2af891984b4b48d8ecbe567649561d32d59 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 9 Jun 2021 10:40:52 +0200 Subject: [PATCH 2/2] gitlab-ci: use mypy from Debian/bullseye to prevent random breakage mypy 0.901 was released and everything broke: https://gitlab.com/linsui/fdroidserver/-/jobs/1330206567 My point is to reduce the number of false job fails like this one. We have a lot of checkers running, I really think they need to prove they are adding value before we invest any time maintaining them. mypy is still "wait and see" in terms of the adding any value. !951 --- .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a004d07..b3f4dad5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -202,9 +202,16 @@ lint_format_safety_bandit_checks: lint_mypy: - image: python:3.9-buster + image: debian:bullseye + <<: *apt-template script: - - pip install mypy + - sed -i '/pyjks/d' setup.py # TODO get from backports once available + # use Debian packages to avoid building C/rust sources + - apt-get install + mypy + python3-cryptography + python3-pip + python3-wheel - pip install -e .[test] # exclude vendored file - mypy --exclude fdroidserver/apksigcopier.py