This repository contains the Dockerfiles used for running Flycheck's unit and integration tests on Travis CI.
all-toolscreates a container (based on Ubuntu 20.04) installing all the tools that Flycheck supports. The full image is around 4.5GB uncompressed.emacs-caskcreates a container (still on Ubuntu 20.04) with Emacs, Cask, and Make installed. This is used to run Flycheck's unit tests. It is configurable: we can build with different Emacs versions.
These two images are scheduled to build monthly (or whenever there is a commit to master), and uploaded to flycheck/all-tools and flycheck/emacs-cask respectively.
There is a third image in flycheck/flycheck,
all-tools-and-emacs-cask. This one is never pushed anywhere; it is built and
used directly on Travis in order to run our integration tests. See the
Flycheck manual on how to use that image to run the
integration tests locally.
Whenever a new checker is added to Flycheck, there should be at least one
integration test for it. For the integration test to run, the tools needs to be
added to the all-tools image.
To add a new tool to the image:
-
Edit
all-tools/Dockerfileto install the tool. Consider adding a line to the language-specific sections (Ruby Gems, Go get, Python pip, npm...) if your tool can be installed with them. Otherwise, you may need to add a newRUNcommand. The official Docker documentation may be helpful.You can test the image locally with
docker build. Note that the build can take around ten minutes or more, depending on your Internet connection. There are many packages to download and to build. If you don't test locally and make a pull request, the Travis integration will build it anyway. -
Edit
all-tools/check-toolsto add a line to output the new tool version. This script is a basic check to ensure the tool is correctly installed and found in the image. It doubles as a useful reference to know which versions of the tools are in the image.You should add a line that outputs the tool version on a single line. The output format should be:
LANGUAGE-CHECKER: VERSIONE.g.:
python-flake8: 3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 2.7.15rc1 on LinuxLANGUAGE-CHECKERshould be the same as in the variableflycheck-checkersfromflycheck.el. Thecheck-toolsscript follows the same order asflycheck-checkers: there is one line per entryflycheck-checkers.VERSIONcan contain other identifying information, as in the example above. Usehead -n1,cutorsedto ensure all relevant information stays on a single line.Some tools output their version number to
stderr; use2>&1to redirect that tostdoutinstead (this is useful to easily check for errors when usingdocker buildlocally, asstderrappears in red).