perl-carton / carton

Bundler or pip freeze for Perl
http://search.cpan.org/dist/carton
Other
494 stars 96 forks source link

Support `--without test` option #247

Open karenetheridge opened 5 years ago

karenetheridge commented 5 years ago

It looks like all that is needed is to add a few lines in Carton::Builder::groups, right where the comment says "TODO support --without test".

This would allow for a much leaner installation, e.g. in production environments where we can skip requirements only needed for testing.

chazmcgarvey commented 5 years ago

Lame Dockerfile workaround:

COPY cpanfile* ./
RUN sed -i -e 's/^test_requires/author_requires/' cpanfile
RUN carton install --deployment --without=develop && rm -rf /root/.cpanm