Skip to content

Commit 014922a

Browse files
committed
install ext-redis for CI checks
Signed-off-by: sergiu <[email protected]>
1 parent c56ae2b commit 014922a

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.laminas-ci/pre-run.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/bash
22

3-
# Due to the fact that we are disabling plugins when installing/updating/downgrading composer dependencies
4-
# we have to manually enable the coding standard here.
5-
composer enable-codestandard
3+
JOB=$3
4+
5+
COMMAND=$(echo "${JOB}" | jq -r '.command // ""')
6+
[[ "${COMMAND}" =~ ^REDIS_VERSION=([0-9\.]+) ]] || exit 0
7+
8+
PHP=$(echo "${JOB}" | jq -r '.php // ""')
9+
REDIS_VERSION=${BASH_REMATCH[1]}
10+
11+
echo "SETUP: Installing ext-redis $REDIS_VERSION with PHP $PHP..."
12+
pecl install -f --configureoptions 'enable-redis-igbinary="yes" enable-redis-lzf="yes"' igbinary redis-${REDIS_VERSION}
13+
14+
if [ $? -ne 0 ]; then
15+
echo "ERROR: Installation of ext-redis $REDIS_VERSION with PHP $PHP failed."
16+
exit 1
17+
fi
18+
19+
echo "extension=redis.so" > /etc/php/${PHP}/mods-available/redis.ini

0 commit comments

Comments
 (0)