functional test and unit test requirements are specified in single file
test_requirements.txt has requirements for unit tests, functional tests, and style tests (black).
Unit test requirements need to be installed inside containers during CI.
Functional test requirements need to be installed on the host that is running the functional tests.
Style requirements should be installed only where code style is being tested (travis host).
Right now we install test_requirements.txt on both the host and the container. The container is no longer able to install 'black' because one of the deps requires gcc. Rather than add gcc to the container we should probably break up the requirements into multiple files.
Here is an example of a failure: https://travis-ci.org/pulp/pulp_file/jobs/604662813#L1444
#2 Updated by email@example.com about 1 year ago
Here is a commit that demonstrates the solution: https://github.com/pulp/pulp_file/pull/302/commits/bdf00a085f22450cc008406d6f9084fdec777eec
#3 Updated by mdellweg about 1 year ago
I am wondering whether we could make use of environment markers .
#5 Updated by firstname.lastname@example.org about 1 year ago
what about using the following names for files?
test_requirements.txt - contains requirements for functional tests
unittest_requirements.txt - contains requirements for unit tests
style_requirements.txt - requirements for the static analysis or style and such
#9 Updated by gmbnomis about 1 year ago
What about moving style requirements into dev_requirements.txt and having a test_requirements.txt and func_test_requirements.txt?
I like that and I have one suggestion: It is possible to include requirement files in other requirement files.
We could have unittest_requirements.txt and functest_requirements.txt to make the CI happy. The usual test_requirements.txt would just include both files.
#10 Updated by email@example.com about 1 year ago
This is a very good idea IMHO. We want to install as little software as possible in the containers to minimize the risk of invalidating the containers for testing. Missing (optional) deps are often the source of bugs (as a former sysadmin, I can tell you this.)
I do think that "test_requirements.txt" should be called something like "functest_requirements.txt" (like gmbnomis said.) Otherwise, unittest_requirements.txt might be assumed to be a subset of it.
#12 Updated by firstname.lastname@example.org about 1 year ago
It was pointed out to me that you can indeed reference requirement files in a requirements file. So that means we will have:
test_requirements.txt (which will simply reference the previous 2)
Please register to edit this issue