Additionally remove `.github` from our root-level `.gitignore` file. I
assume it was erroneously added some time ago since we have files in
this repo.
Fixes#2705
* Rework `HEXPIRE` test inclusion + bump Valkey
* Add a little `haveCommand` helper which uses `COMMAND INFO` to check
if a given server has a specific command. This way when we bump valkey
to an official release that supports the commands we will start
testing.
* Bump Valkey from 7.2.5 to 8.1.3 which is much newer.
* Rework `haveCommand` to explicitly check for the command name
COMMAND INFO will return the command name as one of the first bits of
data so we can check for it that way.
* Fix incorrect logic
We often have to rerun the test suite on GitHub actions because of a
hard to reproduce "Read error on connection" exception when getting a
new `RedisCluster` instance.
No one has ever reported this failure outside of GitHub CI and it's not
clear exactly what might be going on.
This commit does two main things:
1. Allows for one failure to construct a new `RedisCluster` instance but
only if we detect we're running in GitHub CI.
2. Adds much more diagnostic information if we still have a fatal error
(e.g. we can't connect in two tries, or some other fatal error
happens). The new info includes the whole callstack before aborting
as well as an attempt to manually ping the seeds with `redis-cli`.
Every so often our tests will fail because we attempt to interact with
one of the daemonized server instances before it has enough time to
actually start.
Usually this happens when we try to use the cli tool to execute
`--cluster-create`, but it can occur elsewhere as well.
This commit adds a step that waits for every instance that we started to
actually be up before trying to create the cluster and run subsequent
unit tests.
Additionally it switches from `$(seq a b)` to the `{a..b}` brace
expansion.
Add Valkey to our server matrix in addition to making the jobs a bit
more efficient by only installing the specific server we're testing on
each run.
For now we allow tests to fail against Valkey as they don't yet have an
official release. Once there is an official release we'll remove the
`continue-on-error` setting for Valkey.
Let gen_stub.php define the constants for us, including deriving their
actual values from C defines.
As a side-effect we have to drop support for PHP < 7.2 as it does not
have interned strings.
* Fix expire check in testttl
The previous logic was timing related and also kind of testing Redis'
expiration logic itself.
* Use a smaller cluster in GitHub CI