Commit graph

13 commits

Author SHA1 Message Date
Tomas Janousek
72397a8c23 tests: Workaround for recent coveralls-python breaking GH Actions
https://github.com/TheKevJames/coveralls-python/issues/252
2021-01-14 15:10:17 -05: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
Tomas Janousek
58af37436e tests: Really move command from docker-compose.yml to Makefile
This makes it easier to understand the interaction between the outer and
inner make, as one doesn't need to dig through docker-compose.yml and
possibly Dockerfile to find what command will be run.

It does break the ability to run `docker-compose run --rm tests` but
that's a good thing I believe: I only ever use that when I need a shell
in the container for debugging purposes.
2020-07-08 21:36:52 -04:00
Tomas Janousek
7663a58793 tests: Fix coverage reporting
Coverage reporting wasn't migrated into the docker container and
therefore did nothing at all.
2020-07-02 09:51:56 -04:00
Tomas Janousek
f0cc8b3ba8 tests: Move command from docker-compose.yml to Makefile
This is a preparation for adding additional commands to the test, like
postprocessing the coverage data, which needs to be processed in the
container (unless we somehow copy the data out of it; but then, we
already install coverage and coveralls inside it, so...).

Additionally, this makes it a bit easier to run the tests locally, which
is helpful when investigating errors. Just a tiny bit, though: it still
requires setting up a fake home with a reasonably minimal .vim and a
python environment with vimrunner.
2020-07-02 09:51:56 -04:00
Tomas Janousek
026d5833be tests: Fix read-only pytest cache directory
We're mounting taskwiki read-only (because the docker container runs as
root) so place the pytest cache elsewhere. This means re-running failed
test isn't possible now. If that is desired, we may run the container as
current user (may require libnss-unknown) instead, later.
2020-07-02 09:51:56 -04:00
Tomas Janousek
e044ebdd02 tests: Pass $PYTEST_FLAGS to pytest
This makes it easier to pass "-s" or "-k TestSomething" when running
"make test".
2020-07-02 09:51:56 -04:00
Tomas Janousek
47922faeee tests: Launch Xvfb with -noreset
An attempt to fix the sporadic "E233: cannot open display" that I'm
still seeing.
2020-07-02 09:51:56 -04:00
Tomas Janousek
c0285cceef tests: Move CMD from Dockerfile to docker-compose.yml
This makes it easier to change the command (e.g. to add `-s`) as we
don't need to tell docker-compose to rebuild the image and container.
2020-07-02 09:51:56 -04:00
Tomas Janousek
21889a2be2 tests: Include xvfb into the Docker image 2020-07-02 09:51:56 -04:00
Tomas Babej
6f62e750cb
tests: Add access to the host X11 socket 2019-02-22 21:00:44 -05:00
Tomas Babej
9aa55f27ee
docker: Use tty: true to preserve color output 2018-07-31 00:00:38 -04:00
Tomas Babej
93b0491334
meta: Add docker compose file 2018-07-30 23:53:08 -04:00