summaryrefslogtreecommitdiff
path: root/.gitlab-ci.d/static_checks.yml
AgeCommit message (Collapse)Author
2021-06-07gitlab: work harder to avoid false positives in checkpatchAlex Bennée
This copies the behaviour of patchew's configuration to make the diff algorithm generate a minimal diff. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210602153247.27651-1-alex.bennee@linaro.org>
2021-06-01gitlab: add python linters to CIJohn Snow
Add a Python container that has just enough juice for us to run the Python code quality analysis tools. Base this container on Fedora, because Fedora has very convenient packaging for testing multiple Python versions. We need python3, pip (for pulling packages), pipenv and virtualenv for creating virtual environments, and tox for running tests. make is needed for running 'make check-tox' and 'make venv-check' targets. Python3.10 is needed explicitly because the tox package only pulls in 3.6-3.9, but we wish to test the forthcoming release of Python as well to help predict any problems. Lastly, we need gcc to compile PyPI packages that may not have a binary distribution available. Add two tests: check-python-pipenv uses pipenv to test a frozen, very explicit set of packages against our minimum supported python version, Python 3.6. This test is not allowed to fail. The dependencies this test uses do not change unless python/Pipfile.lock is changed. check-python-tox uses tox to install the latest versions of required python dependencies against a wide array of Python versions from 3.6 to 3.9, even including the yet-to-be-released Python 3.10. This test is allowed to fail with a warning. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Cleber Rosa <crosa@redhat.com> Message-id: 20210527211715.394144-32-jsnow@redhat.com [Fix rebase conflict over .gitlab-ci.yml --js] Signed-off-by: John Snow <jsnow@redhat.com>
2021-05-27gitlab: Convert check-dco/check-patch jobs to the 'rules' syntaxPhilippe Mathieu-Daudé
Per GitLab documentation [*]: "rules replaces only/except and they can’t be used together in the same job." Since the 'rules' syntax is more powerful and we are already using it, convert the check-dco/check-patch jobs so no job use the 'only/ except' syntax. [*] https://docs.gitlab.com/ee/ci/yaml/#rules Inspired-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Message-Id: <20210525132418.4133235-3-f4bug@amsat.org>
2021-05-27gitlab: Use $CI_DEFAULT_BRANCH instead of hardcoded 'master'Philippe Mathieu-Daudé
We want to skip the checkpatch and DCO signoff jobs when pushing to the default branch. Currently this branch is called 'master', but we don't need to hardcode this in the CI configuration, because the $CI_DEFAULT_BRANCH env variable exposes it. References: - https://sfconservancy.org/news/2020/jun/23/gitbranchname/ - https://about.gitlab.com/blog/2021/03/10/new-git-default-branch-name/ Suggested-by: Savitoj Singh <savsingh@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210525153826.4174157-1-philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com>
2021-05-27gitlab: Extract DCO/style check jobs to static_checks.ymlPhilippe Mathieu-Daudé
Extract the DCO / checkpatch jobs to a new file (static_checks.yml) to be able to run them without having to run all the jobs included in the default .gitlab-ci.yml, which are mainly useful for the mainstream CI. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Message-Id: <20210519185504.2198573-6-f4bug@amsat.org> Signed-off-by: Thomas Huth <thuth@redhat.com>