preaction / Minion-Backend-mysql

MySQL backend for the 🐙 Minion job runner
Other
7 stars 14 forks source link

Test MySQL and various MariaDB versions on Travis #14

Closed paultcochrane closed 5 years ago

paultcochrane commented 6 years ago

In order to do this, one needs to create a build matrix for Travis. Usually, a build matrix is automatically constructed by Travis, however only for combinations of Runtime, Environment and Exclusions/Inclusions (see Customizing the Build for more details). Hence it's necessary to construct the build matrix explicitly. It turns out that MySQL is currently version 5.6 on Travis and that they don't support other versions explicitly. However, they do support MariaDB in various versions (5.5, 10.0, and 10.1), hence why one uses the addons feature in order to do this. Each desired perl-mysql/mariadb combination thus needs to be specified explicitly, hence this change is rather large and seems quire repetitive. The libmariadbclient-dev package is required for MariaDB builds so that the mysql_config program is available for DBD::mysql during its build and installation phase.

If you want the number of combinations reduced, just let me know what you want and I'll update the PR and resubmit. I believe this goes some way to satisfying the requirements of #1. How much more would you like to be implemented so that #1 can be considered complete?

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 96.875% when pulling 816b5a28839f48aa82347c0df0b65d2ff724a489 on paultcochrane:pr/test-multiple-mysqls-on-travis into 82739bf302032e45e8e5f04479187105f2bc142a on preaction:master.

preaction commented 6 years ago

This looks good, but I don't think we need to test the intersection of Perl version / MySQL version. We should just pick a single Perl version and test the various MySQL versions with that (that way, we aren't varying two things, just one thing).

There are some other versions of MySQL at https://dev.mysql.com/downloads/repo/apt/. I don't know if Travis lets you add new APT repos and install the software in them, though.

1 is also about testing the database upgrade/migration stuff. So we'd need a small Mojolicious app and to try running that app (queuing a task) to make sure the database migration works.

This is a great start towards that though, thanks!

paultcochrane commented 6 years ago

Yeah, you're right about doing all Perl and MySQL versions was a bit much. Do you have any particular Perl version preference for the MySQL version check? I was thinking either 5.24 or 5.26.

Travis allows new APT repos to be defined, so we can definitely test some other MySQL versions. I'll try to get MySQL versions 5.6, 5.7 and 8.0 as well as MariaDB versions 10.0 and 10.1 into the build matrix.

preaction commented 6 years ago

Perl 5.24 will be fine, or whatever Perl travis has in there easiest (since there's a time limit).

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.4%) to 96.503% when pulling 4883e1757cd13d7560b2682fabd3d38362d9537e on paultcochrane:pr/test-multiple-mysqls-on-travis into 82739bf302032e45e8e5f04479187105f2bc142a on preaction:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.4%) to 96.503% when pulling 4883e1757cd13d7560b2682fabd3d38362d9537e on paultcochrane:pr/test-multiple-mysqls-on-travis into 82739bf302032e45e8e5f04479187105f2bc142a on preaction:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 98.429% when pulling 96fcffd2b834e72fc84929f552dae0323d766d65 on paultcochrane:pr/test-multiple-mysqls-on-travis into 6cf7d4baaa56296fae2e88909c723634befd7053 on preaction:master.

pali commented 5 years ago

Just for inspiration how Perl's DBD-MariaDB driver is tested with different versions of MySQL and MariaDB clients and servers on Travis CI (more then 150 combinations in matrix): https://github.com/gooddata/DBD-MariaDB/blob/master/.travis.yml https://travis-ci.org/gooddata/DBD-MariaDB

preaction commented 5 years ago

I merged this from the command line, thanks!