Basically, we only need to change:
- PHP 8.0
- MySQL 8.0
- PostgreSQL 13
Also, remove any php-xmlrpc installation because they aren't
needed since Moodle 4.1.
Finally, ensure that we aren't using mysql bin logs ever, because
they are huge and can make the 1Gb tmpfs to become full. This is
specifically needed for MySQL 8.0, because it comes with bin logs
enabled by default.
We have forked the mysql-action to achieve that:
https://github.com/moodlehq/mysql-action
Worth blaming travis because, after PG 11 and 12 using port 5433,
now they are back (in PG 13) to port 5432. Surely there is some
logic behind the undocumented ping-pong but...
Have tried to also bump Travis to 22.04 (jammy) but it
was not working ok, with problems trying to find both
PHP and PostgreSQL versions.
Surely that's because 22.04 support is really new (Sep 9, 2022):
https://blog.travis-ci.com/22-9-9-ubuntujammy
So we'll have to wait a little more before being able to, also,
bump Travis to use 22.04
Basically, we only need to change:
- PHP 7.4
- PostgreSQL 12
Also, moving up to focal as dev environment, removing NVM_VERSION
because nvm automatically detects .nvmrc and switching to
socketed connection for PostgreSQL (little improvements).
We are disabling the -v (verbose) option, used by default. Still,
now we support a secret (that can be added to everyone's repository)
to accept any PHPUnit's command line options and run the tests with
them.
Some examples:
phpunit_options = -v (to keep the verbose option enabled)
phpunit_options = --testdox (to print information about every test...)
... (basically anything supported by the CLI).
Also, we are raising here the environment from Ubuntu 18.04 to 20.04
(self tested by GHA, heh)
Also adds xmlrpc-beta from PECL (PHP8 moved the extension there)
and setups max_input_vars=5000 as initial value (see MDL-71390).
Note that this also includes a tiny modification when configuring
redis sessions, because there was some outdated code from old issue,
now fixed (MDL-60978), so that info has been removed.
First working version, supports phpunit (using build matrix):
- php72 (lowest), running mysql.
- php74 (highest), running postgres.
Also verifies that the branch has been "gruntified" and there
isn't any missing change (build js/css files).
TODO: Verify the remaining checks currently in .travis.yml, namely:
- CITEST
- Add caching
- Better health-check for DB images.
- Support from the tracker (satus badges and enable check).
- Support from CiBoT (status and enable check).
- Consider moving both the common setup (git, composer...)
and the database (mysql, postgres) to own actions for
easier tweaking.