fpgmaas/deptry

Speed up functional tests

Closed this issue · 0 comments

Functional tests run in dedicated virtual environments to avoid poisoning the virtual environment used to run tests. We do reuse an environment if multiple tests depend on the same test project, but we have several different projects. Part of the environment setup is installing deptry from the local environment, meaning that we do not use a pre-built wheel, thus re-building the package every time we bootstrap a new virtual environment.

We could speed up functional tests with different options:

  • building deptry wheel once for the current Python version/OS/architecture, and re-using it across our different tests
  • running functional tests in parallel

2nd solution seems less scalable, as each long operation of building wheels would get done on one process, but the number of environments could be greater than the number of processes we run tests on, so we could end up having 2 environments that sequentially build the same wheel from scratch on the same process.

We could maybe combine the 2 options by ensuring that we always build a wheel from scratch, then use this wheel and run tests.