Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@users.noreply.github.com>2021-07-19 07:04:37 +0300
committerGitHub <noreply@github.com>2021-07-19 07:04:37 +0300
commitfa3a6fe0aae7ffcfb72ceee421b94036dbf31308 (patch)
treed5e0e0451da37ca97ad27bb7b48b51f2b730e576
parentc3ab4a25bc186493b6cf73d94c469bab5f134da9 (diff)
parent43b3821b3602b918195ae635b7e9e72d48519714 (diff)
Merge pull request #1990 from phpredis/actions
GitHub Actions
-rw-r--r--.github/workflows/ci.yml81
-rw-r--r--.travis.yml72
-rw-r--r--README.markdown2
3 files changed, 82 insertions, 73 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..7fadd586
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,81 @@
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ continue-on-error: ${{ matrix.experimental }}
+ strategy:
+ fail-fast: false
+ matrix:
+ php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
+ experimental: [false]
+ include:
+ - php: '8.1'
+ experimental: true
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Install PHP ${{ matrix.php }}
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: json, igbinary, msgpack, :redis
+ coverage: none
+ tools: none
+ - name: Install dependencies
+ run: |
+ sudo add-apt-repository ppa:redislabs/redis
+ sudo add-apt-repository ppa:ondrej/php
+ sudo apt-get update
+ sudo apt-get install redis valgrind libzstd-dev liblz4-dev
+ - name: Build phpredis
+ run: |
+ phpize
+ ./configure --enable-redis-lzf --enable-redis-zstd --enable-redis-igbinary --enable-redis-msgpack --enable-redis-lz4 --with-liblz4
+ sudo make install
+ sudo mkdir -p /etc/php/${{ matrix.php }}/cli/conf.d
+ echo 'extension = redis.so' | sudo tee -a /etc/php/${{ matrix.php }}/cli/conf.d/90-redis.ini
+ - name: Start redis
+ run: |
+ redis-cli SHUTDOWN NOSAVE
+ for PORT in $(seq 6379 6382) $(seq 32767 32769); do
+ redis-server --port $PORT --daemonize yes --aclfile tests/users.acl
+ done
+ redis-server --port 0 --unixsocket /tmp/redis.sock --daemonize yes --aclfile tests/users.acl
+ - name: Start redis cluster
+ run: |
+ mkdir -p tests/nodes
+ echo -n > tests/nodes/nodemap
+ for PORT in $(seq 7000 7011); do
+ redis-server --port $PORT --cluster-enabled yes --cluster-config-file $PORT.conf --daemonize yes --aclfile tests/users.acl
+ echo 127.0.0.1:$PORT >> tests/nodes/nodemap
+ done
+ echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 7000 7011) --cluster-replicas 3 --user phpredis -a phpredis
+ - name: Start redis sentinel
+ run: |
+ wget raw.githubusercontent.com/redis/redis/6.2/sentinel.conf
+ for PORT in $(seq 26379 26380); do
+ cp sentinel.conf $PORT.conf
+ sed -i '/^sentinel/d' $PORT.conf
+ redis-server $PORT.conf --port $PORT --daemonize yes --sentinel monitor mymaster 127.0.0.1 6379 1 --sentinel auth-pass mymaster phpredis
+ done
+ - name: Run tests
+ run: |
+ php tests/TestRedis.php --class Redis --user phpredis --auth phpredis
+ php tests/TestRedis.php --class RedisArray --user phpredis --auth phpredis
+ php tests/TestRedis.php --class RedisCluster --user phpredis --auth phpredis
+ php tests/TestRedis.php --class RedisSentinel --auth phpredis
+ env:
+ TEST_PHP_ARGS: -e
+ - name: Run tests using valgrind
+ continue-on-error: true
+ run: |
+ valgrind --error-exitcode=1 php tests/TestRedis.php --class Redis --user phpredis --auth phpredis
+ valgrind --error-exitcode=1 php tests/TestRedis.php --class RedisArray --user phpredis --auth phpredis
+ valgrind --error-exitcode=1 php tests/TestRedis.php --class RedisCluster --user phpredis --auth phpredis
+ valgrind --error-exitcode=1 php tests/TestRedis.php --class RedisSentinel --auth phpredis
+ env:
+ TEST_PHP_ARGS: -e
+ USE_ZEND_ALLOC: 0
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 664f2f38..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,72 +0,0 @@
-language: php
-php:
- - 7.0
- - 7.1
- - 7.2
- - 7.3
- - 7.4
- - 8.0
- - nightly
-env: CC=gcc
-matrix:
- allow_failures:
- - php: 7.3
- env: CC=clang
- - php: 7.4
- env: CC=clang
- - php: 8.0
- env: CC=clang
- - php: nightly
- include:
- - php: 7.0
- env: CC=clang
- - php: 7.1
- env: CC=clang
- - php: 7.2
- env: CC=clang
- - php: 7.3
- env: CC=clang
- - php: 7.4
- env: CC=clang
- - php: 8.0
- env: CC=clang
-addons:
- apt:
- update: true
- sources:
- - sourceline: ppa:redislabs/redis
- packages:
- - clang
- - libzstd1-dev
- - liblz4-dev
- - pkg-config
- - valgrind
- - stunnel
- - redis
-before_install:
- - phpize
- - CFGARGS="--enable-redis-lzf --enable-redis-zstd --enable-redis-lz4 --with-liblz4"
- - pecl install igbinary && CFGARGS="$CFGARGS --enable-redis-igbinary" || true
- - pecl install msgpack && CFGARGS="$CFGARGS --enable-redis-msgpack" || true
- - ./configure $CFGARGS
-install: make install
-before_script:
- - mkdir -p tests/nodes/ && echo > tests/nodes/nodemap
- - redis-server --port 0 --daemonize yes --aclfile tests/users.acl --unixsocket /tmp/redis.sock
- - for PORT in $(seq 6379 6382) $(seq 32767 32769); do redis-server --port $PORT --daemonize yes --aclfile tests/users.acl; done
- - for PORT in $(seq 7000 7011); do redis-server --port $PORT --cluster-enabled yes --cluster-config-file $PORT.conf --daemonize yes --aclfile tests/users.acl; echo 127.0.0.1:$PORT >> tests/nodes/nodemap; done
- - for PORT in $(seq 26379 26380); do wget raw.githubusercontent.com/redis/redis/6.0/sentinel.conf -O $PORT.conf; sed -i '/^sentinel/d' $PORT.conf; redis-server $PORT.conf --port $PORT --daemonize yes --sentinel monitor mymaster 127.0.0.1 6379 1 --sentinel auth-pass mymaster phpredis; done
- - echo yes | redis-cli --cluster create $(seq -f 127.0.0.1:%g 7000 7011) --cluster-replicas 3 --user phpredis -a phpredis
- - echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- - openssl req -x509 -newkey rsa:1024 -nodes -keyout stunnel.key -out stunnel.pem -days 1 -subj '/CN=localhost'
- - echo -e 'key=stunnel.key\ncert=stunnel.pem\npid=/tmp/stunnel.pid\n[redis]\naccept=6378\nconnect=6379' > stunnel.conf
- - stunnel stunnel.conf
-script:
- - php tests/TestRedis.php --class Redis --user phpredis --auth phpredis
- - php tests/TestRedis.php --class RedisArray --user phpredis --auth phpredis
- - php tests/TestRedis.php --class RedisCluster --user phpredis --auth phpredis
- - php tests/TestRedis.php --class RedisSentinel --auth phpredis
- - USE_ZEND_ALLOC=0 valgrind --error-exitcode=1 php tests/TestRedis.php --class Redis --user phpredis --auth phpredis
- - USE_ZEND_ALLOC=0 valgrind --error-exitcode=1 php tests/TestRedis.php --class RedisArray --user phpredis --auth phpredis
- - USE_ZEND_ALLOC=0 valgrind --error-exitcode=1 php tests/TestRedis.php --class RedisCluster --user phpredis --auth phpredis
- - USE_ZEND_ALLOC=0 valgrind --error-exitcode=1 php tests/TestRedis.php --class RedisSentinel --auth phpredis
diff --git a/README.markdown b/README.markdown
index 4840f4cd..b8251c53 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,6 +1,6 @@
# PhpRedis
-[![Build Status](https://travis-ci.com/phpredis/phpredis.svg?branch=develop)](https://travis-ci.com/phpredis/phpredis)
+[![Build Status](https://github.com/phpredis/phpredis/actions/workflows/ci.yml/badge.svg)](https://github.com/phpredis/phpredis/actions/workflows/ci.yml)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/13205/badge.svg)](https://scan.coverity.com/projects/phpredis-phpredis)
[![PHP version from Travis config](https://img.shields.io/travis/php-v/phpredis/phpredis/develop)](https://img.shields.io/travis/php-v/phpredis/phpredis/develop)