Skip to content

Set up complete CI/CD pipeline

Pipeline tasks

  • Set v3.8 as default container
  • Add tests on all supported Python versions: 3.6, 3.7, 3.8, 3.9.
  • Separate distinct jobs for each tasks, pylint and mypy are also in the same job
  • Move format, build, mypy, and pylint into a first stage: beforehand checks stage
  • Install development dependencies into the container 3.8:
    • black, mypy, pylint and sphinx
    • In order to speed-up the jobs
  • Remove github job:
    • Replace it with GitLab mirroring feature
  • Add support for Python 3.9
  • Minor Python version in the runners labels doesn't makes sense, Since Py3.5 has been dropped and Py3.9 is getting introduced. Having two test jobs per runner is sharing the load. Use common labels with Silkaj (poetry-{56,78} to redshift, mille)

Pylint job

Import issue

pylint installed via pip on the image causes following import issues. pylint has to be installed within poetry virtualenv. There an issue to handle E0401 and E1101 top-level dependencies import rules.

  • Install pylint, as well as other dev dependencies into poetry virtualenv.
  • Can we just install pylint? Not with poetry install pylint.

init-hook

Pylint does not found the folder where the dependencies are stored: Poetry virtualenv.

Job taking too long

The job is taking a bit too long compared to the other jobs in the check stage, because it's installing the runtime and the dev dependencies. The others takes 1min against 3min, since the used tools (dev deps) are installed on the image.

  • Move pylint job to the tests stage, since the test jobs are also installing all dependencies.
Edited by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information