jeudi 21 janvier 2016

Are Git submodules a good idea to NOT force library users to download its tests?

When developing a code library I would like to separate its tests from the actual code payload, as I believe when someone uses my library they just want to use it and they're not interested in testing it -- testing is my responsibility, not my users'.

I know that storage space is cheap and so is bandwidth, yet my principle is not to waste either of them.

I'm thinking of putting all the test code into a separate git repository, and use it as a git submodule in the main repository.

This way, those who're interested can still obtain and execute the tests, but normally when you clone the main repository, the only extra files are the empty directory for the submodule, and the .gitmodules file.

Is this a good idea?

Aucun commentaire:

Enregistrer un commentaire