Loking at CPAN::Digger I saw that Geo-TCX does not have any CI configured. Let's contribute that to the project.

Unnecessary Makefile.PL ?

Looking at the source code of the prorject I was a bit confused as the Makefile.PL did not contain any reference to GitHub, but somehow MetaCPAN did know about the GitHub of this project. Then I noticed there is also a dist.ini file. This looks confusing and probably unnecessary.

So I tried to install the dependencies and running the tests using dzil just to have it complain:

$ dzil test
[DZ] building distribution under .build/KWtstz9M9b for installation
[DZ] beginning to build Geo-TCX
[DZ] guessing dist's main_module is lib/Geo/TCX.pm
[VersionFromModule] dist version 1.01 (from lib/Geo/TCX.pm)
[DZ] attempt to add Makefile.PL multiple times; added by: filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line 235); encoded_content added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 236); content set by MakeMaker (Dist::Zilla::Plugin::MakeMaker line 337); content added by @Basic/MakeMaker (Dist::Zilla::Plugin::MakeMaker line 152)
aborting; duplicate files would be produced at /home/gabor/perl5/lib/perl5/Dist/Zilla/App/Command/test.pm line 82.

I guess that Makefile.PL is really problematic. So I opened an issue.

test failure

After removing Makefile.PL (rm Makefile.PL) the tests could be executed, but they still failed with this:

t/01_main.t ........ 1/72 Uncaught exception from user code:
    /home/gabor/Data/Garmin/ not a valid directory at t/01_main.t line 75.
    Geo::TCX::set_wd(Geo::TCX=HASH(0x55bb2977a578), "~/Data/Garmin") called at /home/gabor/os/geo-tcx/.build/1zo6gQMAHa/blib/lib/Geo/TCX.pm line 164
    Geo::TCX::new("Geo::TCX", "t/2014-08-11-10-25-15.tcx", "work_dir", "~/Data/Garmin") called at t/01_main.t line 75
# Looks like your test exited with 2 just after 19.

This looks scary. Why does this module look at a directory outside its data structure. I hope it did not do anything else.

This was also reported.

.gitignore .build

Dist::Zilla also generates a directory called .build. It should be ignored. pull request.

GitHub Actions

Then came the .github/workflows/ci.yml file with a special command in one of the steps. Before installing all the dependencies we remove the Makefile.PL.

    - name: Install Modules
      run: |
        rm -f Makefile.PL
        dzil authordeps --missing | cpanm --notest
        dzil listdeps --missing | cpanm --notest

If the author agrees to my earlier suggestion and removes the Makefile.PL from the repository then this command should also be removed from here, but for now we need it.

The CI process fails with the same error as I have already reported, but once this issue is fixed then the CI should also pass.

I saved the full configuration file here, so even if the author changes it later, you'll still see the original version:

examples/geo-tcx-ci.yml

name: Perl

on:
  push:
  pull_request:

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        runner: [ubuntu-latest] # , macos-latest, windows-latest
        perl: [ '5.36' ]

    runs-on: ${{matrix.runner}}
    name: OS ${{matrix.runner}} Perl ${{matrix.perl}}

    steps:
    - uses: actions/checkout@v2

    - name: Set up perl
      uses: shogo82148/actions-setup-perl@v1
      with:
          perl-version: ${{ matrix.perl }}
          distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }}

    - name: Show Perl Version
      run: |
        perl -v

    - name: Install Dist::Zilla
      run: |
        cpanm -v
        cpanm --notest Dist::Zilla

    - name: Install Modules
      run: |
        rm -f Makefile.PL
        dzil authordeps --missing | cpanm --notest
        dzil listdeps --missing | cpanm --notest

    - name: Run tests
      run: |
        dzil test

    - name: Show Errors on Windows
      if:  ${{ failure() && startsWith( matrix.runner, 'windows-')}}
      run: |
         ls -l C:/Users/
         ls -l C:/Users/RUNNER~1/
         cat C:/Users/runneradmin/.cpanm/work/*/build.log

    - name: Show Errors on Ubuntu
      if:  ${{ failure() && startsWith( matrix.runner, 'ubuntu-')}}
      run: |
         cat /home/runner/.cpanm/work/*/build.log

    - name: Show Errors on OSX
      if:  ${{ failure() && startsWith( matrix.runner, 'macos-')}}
      run: |
         cat  /Users/runner/.cpanm/work/*/build.log