Skip to content

Fix: Timer::tick callback throw exception cause process exit(Swoole\C… #209

Fix: Timer::tick callback throw exception cause process exit(Swoole\C…

Fix: Timer::tick callback throw exception cause process exit(Swoole\C… #209

Workflow file for this run

name: ci
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
swoole: [
4.5-php7.1,
4.5-php7.2,
4.5-php7.3,
4.5-php7.4,
4.5-php8.0,
php8.1,
]
kafka: [1.0.0, 2.11-1.1.1, 2.13-2.6.0, 2.13-2.7.0]
env:
SWOOLE_VERSION: ${{ matrix.swoole }}
KAFKA_VERSION: ${{ matrix.kafka }}
KAFKA_HOST: kafka1
KAFKA_PLAINTEXT_PORT: 9092
KAFKA_SASL_PLAINTEXT_PORT: 9093
KAFKA_SASL_SSL_PORT: 9094
KAFKA_SSL_PORT: 9095
KAFKA_SASL: '{"type":"longlang\\phpkafka\\Sasl\\PlainSasl","username":"admin","password":"admin-secret"}'
KAFKA_SSL: '{"open":true,"verifyPeer":true,"allowSelfSigned":true,"verifyPeerName":true,"cafile":"/kafka-client/.github/kafka/cert/ca-cert"}'
steps:
- uses: actions/checkout@v2
- name: start docker
run: |
cd .github
# run
docker-compose up -d
# swoole
docker exec swoole php -v && docker exec swoole php --ri swoole && docker exec swoole composer -V
docker ps -a && docker ps
- name: prepare
run: |
docker exec swoole composer update
docker exec kafka1 /opt/kafka/bin/kafka-topics.sh --zookeeper zookeeper:2181 --create --partitions 3 --replication-factor 1 --topic test
docker exec kafka1 /opt/kafka/bin/kafka-topics.sh --zookeeper zookeeper:2181 --create --partitions 3 --replication-factor 1 --topic test-header
- name: plaintext-test
run: |
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_PLAINTEXT_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" swoole composer test
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_PLAINTEXT_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" swoole composer swoole-test
- name: sasl-plaintext-test
run: |
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_SASL_PLAINTEXT_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" -e KAFKA_SASL="$KAFKA_SASL" swoole composer test
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_SASL_PLAINTEXT_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" -e KAFKA_SASL="$KAFKA_SASL" swoole composer swoole-test
- name: sasl-ssl-test
run: |
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_SASL_SSL_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" -e KAFKA_SASL="$KAFKA_SASL" -e KAFKA_SSL="$KAFKA_SSL" swoole composer test
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_SASL_SSL_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" -e KAFKA_SASL="$KAFKA_SASL" -e KAFKA_SSL="$KAFKA_SSL" swoole composer swoole-test
- name: ssl-test
run: |
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_SSL_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" -e KAFKA_SSL="$KAFKA_SSL" swoole composer test
docker exec -e KAFKA_HOST="$KAFKA_HOST" -e KAFKA_PORT="$KAFKA_SSL_PORT" -e KAFKA_VERSION="$KAFKA_VERSION" -e KAFKA_SSL="$KAFKA_SSL" swoole composer swoole-test