Mentions légales du service

Skip to content

Refactor tests pipeline, introducing 'scripts/run_tests.sh'.

ANDREY Paul requested to merge revise-ci-and-tests into develop

This MR is about refactoring and improving the way tests are launched, notably on the CI/CD. The aim is to improve code and outputs readability, as well as maintainability of the test suite and CI/CD configuration.

  • Add the 'scripts/run_tests.sh' bash script, which enables running various blocks of tests. This mostly refactors instructions that used to be part of 'tox.ini', in a more convenient way:
    • some tests are grouped (commands in a group all run, but the group fails if any has failed once all are done);
    • instructions are (hopefully) easier to read through and should be easier to maintain in the future;
    • it should be easier to decline more groups in the future (e.g. to have a routine with only unit tests);
    • groups of tests can be run easily, including without using tox.
  • Have the 'tox.ini' file trigger some groups of tests by calling the new bash script. This makes the tox file easier to read and parse through, and merely oriented at providing run isolation.
  • Split test groups into various envs in tox, which may be slightly more costly to run, but enables writing simpler CI/CD pipelines that merely pass arguments to the tox command.
  • Keep a "main" job that groups all others. This is useful in the Inria shared Gitlab Runner, as caching is disabled, so that the use of distinct jobs would result in redundant costful package installations.
  • Make it explicit in 'tox.ini' that tests can be run with python 3.8 and onwards.
  • Adjust the '.gitlab-ci.yml' file to make use of the former changes, and make it cleaner (and up to the current GitLab CI/CD reference).
  • In addition, slightly revise tests' trigger policy, and configure them to run on the "medium" shared inria runner rather than "small" one.

Merge request reports