Skip to content

Instantly share code, notes, and snippets.

@mugifly

mugifly/circle.yml

Last active Jun 28, 2016
Embed
What would you like to do?
Test of Perl project (dependency managed using cpanm & carton) on Circle-CI
machine:
environment:
# Path
PATH: "$PATH:/home/$USER/perl5/bin"
# cpanm - Install destination of libraries
PERL_CPANM_OPT: "--local-lib=/home/$USER/perl5"
# perl - Include path
PERL5LIB: "/home/$USER/perl5/lib/perl5:$PERL5LIB"
dependencies:
cache_directories:
- ~/perl5
- local
pre:
# Install the cpanm (cpanminus) command
- curl -L https://cpanmin.us | perl - App::cpanminus
# Install the carton command using cpanm
- cpanm Carton
override:
# Install the dependency cpan modules using cpanfile
- carton install
test:
override:
# Run the tests
- carton exec -- prove -l -m -Q -r t/ --formatter=TAP::Formatter::JUnit> result.xml
# Convert charset of the test results
# Thanks for http://qiita.com/uchiko/items/65254be5e9504c9c1742
- perl -i -ple 's/\[\\x([a-f0-9]{2})\]/pack("H*", $1)/egx' result.xml
# Copy the test results to Circle-CI Artifacts
- cp result.xml $CIRCLE_TEST_REPORTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.