As @chreekat mentioned in https://community.snowdrift.coop/t/ci-work-in-progress/1381/4, the crowdmatch tests were doing something different wrt to the postgres database used: They use an in-memory database to speed up the tests (which does make a huge difference indeed on my build-machine). In order to accomplish this, an in-memory directory is created (as a subdirectory of
/dev/shm) and postgres is told to use it via a tablespace.
However, in the new CI setup, the postgres database runs in its own docker container (as you can tell from the
services: - postgres:9.3 in the
.gitlab-ci.yml), so when the directory is created by the haskell code, it ends up only in the container that runs the tests, but not in the one that runs the test database. This is why the tests failed by saying that
"/dev/shm/crowdmatch_test_tablespace" didn't exist.
I fixed this by making the code responsible for the in-memory database fall back to the
snowdrift_test database (which is created on the postgres container because of the
variables: POSTGRES_DB: snowdrift_test in
.gitlab-ci.yml) in case setting up the in-memory one fails.