This is a short HOWTO for testing a package with wercker CI, a Docker-based continuous integration service.

CAVEAT: Currently, wercker requires far too many GitHub permissions. The people at wercker are aware of the problem, let's hope for the best. Don't use the service if you feel uncomfortable giving full access to your GitHub repositories (public and private) to wercker.

Comparison to Travis CI

  • It's faster: Initialization and teardown of tests in just under 30 seconds, because the expensive installation of dependent packages is carried out when building the Docker container

  • Images of failing builds can be downloaded and inspected

  • Builds can be run locally under exactly the same environment via the wercker build command

  • Custom base images that suit your needs

  • Better separation of logs in the web view

Adapt your package

  1. Install makeR in your package, use it to add a wercker.yml:

    curl | sh;
    make init-wercker;
    make init-gh-pages;
    make init-staticdocs;
    make dt_test;
  2. Use Authors@R in DESCRIPTION

    • Current R forbids the use of as.person() in Authors@R, use a construct like person("Kirill", "Müller", role = c("ctb", "cre"), email = "")
  3. Add URLs to DESCRIPTION like this:


Some GUI work with wercker

  1. Create a new application

    • Use "wercker will checkout the code without using an SSH key" in step 4 ("Configure access")
    • Keep "Docker" checked in step 5, ignore the proposed wercker.yml
    • Consider opting out of sharing the project in step 6 for security reasons (if not, carefully check log output for leaked private variables and keys)
  2. Set up GitHub Pages

    • Generate a new key pair, name does not matter, e.g. deploy_ssh
    • Copy it to clipboard
    • Add a deploy target "GitHub-Pages"
      • Choose auto-deploy as desired
      • Add a new "variable", your SSH key pair, name DEPLOY_SSH
      • Save
    • Head over to the GitHub repository (icon at the top right)
      • Settings
      • Deploy keys
      • Add your key from the clipboard, name does not matter, e.g. wercker
      • Allow push access for the key
  3. Set up codecov

    • Add your repository
    • Copy your token
    • In your wercker settings, hit Add new variable
      • Name: CODECOV_TOKEN
      • Value: (as copied from codecov)
      • make it protected
      • save
  4. Start the build

    git push

Badge your

  1. Get your badge from wercker (there seems to be no way to infer the badge URL)

    • don't forget to select "Master"
  2. codecov uses repo user and name (but twice):


Some GUI work on GitHub

  1. Add the link to your package's GitHub Pages to the description of your repo

Finding files in subdirectories

How to locate your files no matter what the subdirectory is Continue reading

Using .gitattributes to avoid merge conflicts

Published on February 25, 2014

xpreen — Integrating xpra with GNU Screen

Published on August 07, 2013