Add your modules
It's pretty simple to add yourself to the list of CPAN authors on our front page. Currently we only support code repos on Github and a limited number of CI services (but we plan to add support for more services in the future).
Here are the steps to follow:
- Decide which of the supported CI services you want to use and configure them correctly. (More details on the various services below.)
- Take a fork of the CPAN Dashboard repo.
- Add a file in the authors directory. Copy this file and name the new file using your CPAN author name.
- Update the file to contain the correct information about your CPAN and Github usenames and the CI services that you use. Switch the various ci.use_XXX flags to 0 for services that you don't use.
- Send a pull request adding your file to my repo.
- Sit back and wait for me to merge your PR.
Supported CI services
We currently support the following CI services:
Github Actions can do many things. But we're just using it to run tests on each commit and report on the success or failure of the test run. Add a directory called .github/workflows to your code repository and in that directory create a YAML file that runs the processes that you want to run. A basic workflow file for testing a CPAN module might look something like this.
You can track as many Github Actions as you like and the badges will stack on top of each other in your dashboard (this isn't currently as pretty as I'd like it, but we're working on it). Remember the values of the name keys in your YAML files as you'll need to add those to the ci.gh_workflow_names option in your new configuration file. We currently expect all of your modules to run the same set of Github Actions.
Coveralls.io measures your test coverage. Log in with your Github credentials and turn on the repos that you want to use. You also have to find a way to feed coverage data to your Coveralls.io account. For example, using GitHub Actions, I define a job like this:
coverage: runs-on: ubuntu-latest container: davorg/perl-coveralls:latest name: Test coverage steps: - uses: actions/checkout@v4 - name: Install modules run: cpanm -n --installdeps . - name: Coverage env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: cover -test -report Coveralls
Next time you commit something to one of your repos, you will also get coverage information appearing at Coveralls.io.
We support Codecov.io, but haven't written instructions for it yet.
We support Cirrus CI, but haven't written instructions for it yet.
We support AppVeyor, but haven't written instructions for it yet.
Fixing issues
A number of issue that could be discovered by the CPAN Dashboard and how to fix them.- Add a link to the code repos to the metadata of all of your CPAN modules. (Gabor has a tutorial about that.)
- Configure GitHub Actions
- Configure Coveralls
- ...