Commit graph

8 commits

Author SHA1 Message Date
Tomas Janousek
6c3c299118 tests: Update test matrix
Python 3.5 is EOL since Sep 2020.
Python 3.9 is out since Oct 2020.
taskwarrior 2.5.2 is out since Dec 2020 (released only on GitHub though).

It's a bit stupid to have to update it manually, but until we figure it
out something better...
2020-12-18 17:49:10 -05:00
Tomas Janousek
d00234b60d ci: Don't hash TASK_DEVEL_SHA for tags (reuses old docker images)
This isn't really necessary but it seems cleaner anyway. :-)
2020-09-18 11:26:08 -04:00
Tomas Janousek
3498c51a46 ci: Simplify getting branch HEAD commit hash
This is simpler and more reliable/predictable:

"git ls-remote 'heads/'" doesn't return anything, while "grep 'heads/'"
returns all branches, so a taskwarrior push causes most docker images
(those that don't have any TASK_VERSION and fallback to the Dockerfile
default) to be rebuilt, not just the one that needs to be.
2020-09-18 11:26:08 -04:00
Tomas Babej
36652d1f9b
ci: Consider the HEAD commit hash for our cache test image tag
For the development branches of taskwarrior, caching 2.5.2 or 2.6.0 is
not sufficient since HEAD is still moving.

Build the tag hash based on the HEAD hash of the development branch in
question.
2020-09-18 02:19:40 -04:00
Tomas Janousek
13ee57540e tests: Refactor Dockerfile to multi-stage (more caching during development)
The previous refactor traded build step caching for smaller image size,
which in turn made fast caching of built images possible, and allowed us
to speed up CI builds. But almost any change in Dockerfile required full
rebuild of everything (vim & taskwarrior), so changes to the Dockerfile
became more painful.

This commit refactors the Dockerfile to use multi-stage builds, which
brings build caching back: vim & taskwarrior are built in separate
stages, which are cached step by step, and then the build artifacts are
copied into the main tests image and runtime dependencies are installed.

There's a catch, of course: --cache-from doesn't work with multi-stage
images unless the experimental BuildKit backend and its inline cache
export are enabled. This requires docker 19.03, which shouldn't be hard
to obtain but isn't installed by default on Travis CI.
2020-08-02 17:24:20 -04:00
Tomas Janousek
ae588783c1 tests: Cache the docker image on GitHub Packages
This speeds up the workflow from cca 9 minutes to less than 4 minutes,
as the 5 minute docker build is replaced with a 10 second docker pull.
2020-08-02 17:24:20 -04:00
Tomas Janousek
8e69ea52fb tests: Update test matrix (varying versions of vim, vimwiki, python)
(taskwarrior 2.5.2 branch fails a few tests, will investigate later)
2020-08-02 17:24:20 -04:00
Tomas Janousek
4e8b01e6e2 tests: Switch from Travis to GitHub Actions (faster)
Primary motivation for this is speed: GitHub Actions doesn't limit the
number of concurrent jobs to 4, and also provides a docker registry
(GitHub Packages) that we can use to cache the image (building the image
takes cca 5 minutes, fetching it would take less than 10 seconds). This
is done in another commit.

The workflow definition is a bit more complicated because coveralls
support for GitHub Actions is less mature than for Travis CI, so we need
to manually tell coveralls that all parallel builds have finished and
that it can publish the combined result.
2020-08-02 17:24:20 -04:00