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
andmypy
are also in the same job -
Move format
,build
,mypy
, andpylint
into a first stage: beforehandchecks
stage -
Install development dependencies into the container 3.8: -
black
,mypy
,pylint
andsphinx
- In order to speed-up the jobs
-
-
Remove githubjob:-
Replace it with GitLab mirroring feature
-
-
Add support for Python 3.9 -
libnacl
: Deprecatedencoding
keywork on Py3.9 Migrate away fromlibnacl
-
-
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}
toredshift
,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 withpoetry install pylint
.
init-hook
init-hook
Pylint does not found the folder where the dependencies are stored: Poetry virtualenv.
-
Specify the root folder or Poetry environment with a pylint configuration, install the virtualenv in the repository.
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 thetests
stage, since the test jobs are also installing all dependencies.
Edited by Moul