Some Questions…

What is GitHub/CI/Travis CI?

GitHub

  • Cost-free Git hosting for Open Source stuff (paid plans for non-public stuff)
  • Easy workflow for merge requests (called Pull Requests at GitHub)
  • Optional features: issue tracking, wiki, static web page hosting (e.g. for online documentation)

Continuous Integration (CI)

  • The idea of automatically running tests upon every commit or push
  • Regularily running tests when the build environment (e.g. dependencies) change.
  • Early noticing regressions due to new code or breaking changes in dependencies.

Travis CI

  • Cost-free hosted CI for Open Source projects (paid plans for non-public stuff)
  • Runs your test suite inside Ubuntu 12.04 or 14.04. (Docker Container or VM)
  • Supports many programming languages, including Perl 5 and 6.

Getting Started with Travis CI and Perl

What to put inside .travis.yml: Overview

  • Syntax: YAML
  • Use "language: perl" for Perl 5 and "language: perl6" for Perl 6
  • Key install: Commands to install build and test requirements. Use cpanm to install Perl modules.
  • Key script: Commands to run test suite. (Not needed if Makefile.PL or Build.PL exists.)
  • Key after_success: Commands which are called if test suite ran successful, e.g. for deployment or coverage calculation.

Basic .travis.yml examples for Perl 5 projects

Which Perl versions to test against?

Simpler .travis.yml and even more Features

language: perl
before_install:
  - eval $(curl https://travis-perl.github.io/init) --auto

Im comparison to stock Travis CI, your .travis.yml now supports:

Drawbacks:

Coverage with Coveralls and Codecov

Travis CI can calculate test coverage using Devel::Cover and report it to Coveralls or Codecov:

install:
  - cpanm --notest --skip-satisfied Devel::Cover::Report::Coveralls
  - cpanm --notest --skip-satisfied Devel::Cover::Report::Codecov

Speed up Job Performance

Drawbacks and Alternatives

Drawbacks and Nitpicking

  • While Travis CI also supports MacOS X in general, Perl 5 and 6 are currently only supported on Linux.
  • Currently only works with GitHub (not with GitLab or Bitbucket).
  • Lags quite a lot behind with regards to new Ubuntu LTS releases. (The availability of Ubuntu 14.04 was announced in October 2015, i.e. 1.5 years after it has been released. Ubuntu 16.04 has not been heard of yet.)
  • Takes a while until new Perl versions are officially available. → Use Travis Perl Helpers and this issue is moot.
  • No other Linux distribution than Ubuntu available.
  • No BSD available.

Alternatives

  • AppVeyor (https://www.appveyor.com/): in case you need a CI for Perl projects under Windows. (Cost-free for Open Source stuff, paid plans for non-public stuff)

Links

Slides

Thanks for listening!