loris has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm jumping on the CD/CI bandwagon and have set up a Gitlab instance, created a new module with module-starter, and pushed it to the remote. In my local repository, running prove -l t works fine. I then added and pushed a .gitlab-ci.yml file with the following contents:

stages: - test job 1: stage: test script: prove -l t tags: - perl

The pipeline runs but fails with the following error:

  TAP::Object::_construct(TAP::Harness=HASH(0x5608cb0c3e98), "TAP::Parser", HASH(0x5608cb64f990)) called at /usr/share/perl/5.24/TAP/Harness.pm line 852
        TAP::Harness::make_parser(TAP::Harness=HASH(0x5608cb0c3e98), TAP::Parser::Scheduler::Job=HASH(0x5608cb80a480)) called at /usr/share/perl/5.24/TAP/Harness.pm line 651
        TAP::Harness::_aggregate_single(TAP::Harness=HASH(0x5608cb0c3e98), TAP::Parser::Aggregator=HASH(0x5608cb6171e0), TAP::Parser::Scheduler=HASH(0x5608cb80a420)) called at /usr/share/perl/5.24/TAP/Harness.pm line 743
        TAP::Harness::aggregate_tests(TAP::Harness=HASH(0x5608cb0c3e98), TAP::Parser::Aggregator=HASH(0x5608cb6171e0), "t") called at /usr/share/perl/5.24/TAP/Harness.pm line 558
        TAP::Harness::__ANON__() called at /usr/share/perl/5.24/TAP/Harness.pm line 571
        TAP::Harness::runtests(TAP::Harness=HASH(0x5608cb0c3e98), "t") called at /usr/share/perl/5.24/App/Prove.pm line 546
        App::Prove::_runtests(App::Prove=HASH(0x5608cb0b7d48), HASH(0x5608cb526548), "t") called at /usr/share/perl/5.24/App/Prove.pm line 504
        App::Prove::run(App::Prove=HASH(0x5608cb0b7d48)) called at /usr/bin/prove line 13
ERROR: Job failed: exit status 1
 

From the above I can't even see what error has occurred. Can anyone illuminate me?

Thanks,

loris

Replies are listed 'Best First'.
Re: Error running Gitlab CI pipeline on module
by loris (Hermit) on Mar 20, 2018 at 12:42 UTC

    D'oh! The problem was that I was trying to run the test in the wrong directory. Changing the .gitlab-ci.yml to:

    stages: - test job 1: stage: test script: - cd Foo-Bar - prove -l t tags: - perl

    did the trick.

    loris