ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
848 stars 573 forks source link

Molecule testing #510

Closed maglub closed 3 years ago

maglub commented 3 years ago

This will add molecule tests to our repo.

I have tested with "all" OS:es that we have previously supported, except for CentOS 8, since I could not properly get it to work. It is probably an easy fix, but I rather get this to you right now for review.

I think it will be an easy migration to go from Travis CI to any other runtime if needed.

I am basing my efforts on Jeff Geerling's docker containers with systemd, with the prepare.yml setting up minor things before the tests, that are missing in his container images. One important thing (for me) is to run the tests against the containers as a non root user.

maglub commented 3 years ago

Argh, docker hub has rate limits which affects Travis CI (probablay only travis-ci.org, and not travis-ci.com).

maglub commented 3 years ago

The Ubuntu 16 build seems to be much slower than the other builds, and is often timing out. I am not sure why, but it might be a memory issue. We are running 5 containers in parallell (postgres 9.6 to 13), so it might be a memory issue. On my Mac, the tests run through within 15 minutes.

maglub commented 3 years ago

I think I am "done" for this iteration. I have fixed my code concerning the comments above, found a decent workaround for Ubuntu 16, and the molecule testing feels stable enough for a first release. I will get started with the Github Actions implementation and come back with a new pull request for that.

If we merge this with master, we can ask @chilinot to test his against centos8 using molecule in https://github.com/ANXS/postgresql/pull/509.

@gclough, @otakup0pe: feel free to merge if you are happy with this. Feels better to have you merge it, rather than I pressing the butten myself.

maglub commented 3 years ago

Closing this as a duplicate of #511