FormaK Tooling: CI - Building

permalink

TLDR: FormaK implements CI for new commits as of PR #4 via GitHub Actions

This post aims to be a short review of FormaK’s tooling for continuous integration (CI).

In the design of the library, FormaK aims to deal with a handful of big features:

FormaK’s design process also leans on testing as part of the design phase (feature tests) and refactoring with confidence in addition to tests for correctness and numerical properties (property-based testing). Altogether, automatic testing is incredibly useful to the project.

The original format for this testing was a bash file: actions/ci.bash. This runs the tests for the project in multiple configurations, but requires remembering to run locally. As a convinience, the project also has a Makefile to enable the command make ci but that doesn’t solve the missing automation.

Instead, the FormaK project now uses GitHub Actions to run these tests automatically. The configurations can be seen in .github/workflows, with one each for:

  • Feature tests: do they pass?
  • Demos: do they run?
  • Unit tests: do they pass?

This integrates automatically with Github PRs to give the following:

Example of Github Actions with one test failing

All in all, this seems to work pretty well. I read "How well do you know Github Actions?" and expected to have it fall apart, but following GitHub's Quickstart got me 95% of the way there.