Skip to content

修复测试 (#696) #75

修复测试 (#696)

修复测试 (#696) #75

Workflow file for this run

name: Daily Test
on:
schedule:
- cron: "0 16 * * *" # 这个值是 UTC 时间,每天北京时间 0 点执行
push:
paths:
- ".github/workflows/daily-test.yml"
pull_request:
paths:
- ".github/workflows/daily-test.yml"
jobs:
daily-test-3_0:
name: 3.0_Linux PHP-${{ matrix.php }} Swoole-${{ matrix.swoole.version }} RoadRunner-${{ matrix.roadrunner }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
swoole:
- version: master
roadrunner: [2.7.*]
env:
ENV_SERVICE: php
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole.version }}
MYSQL_DOCKER_VERSION: "8.0"
REDIS_SERVER_HOST: redis
ROADRUNNER_DOCKER_VERSION: ${{ matrix.roadrunner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPOSER_ENV: --ignore-platform-reqs
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "3.0"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: /tmp/base_cache/composer
key: ${{ runner.os }}-daily-test-3.0-composer-${{ matrix.php }}-${{ hashFiles('*/composer.json', 'src/Components/*/composer.json') }}
restore-keys: |
${{ runner.os }}-daily-test-3.0-composer-${{ matrix.php }}-
${{ runner.os }}-daily-test-3.0-composer-
- name: Prepare
uses: ./.github/actions/ci-prepare
with:
env: ${{ env.ENV_SERVICE }}
- name: Test
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test
- name: Test swoole
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-swoole
- name: Test workerman
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman
- name: Test workerman-gateway
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman-gateway
- name: Test roadrunner
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-roadrunner
- name: Test fpm
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-fpm
- name: Test jwt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-jwt
- name: Test queue
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-queue
- name: Test amqp
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-amqp
- name: Test kafka
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-kafka
- name: Test grpc
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-grpc
- name: Test snowflake
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-snowflake
- name: Test mqtt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-mqtt
- name: Test smarty
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-smarty
- name: Test pgsql
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-pgsql
- name: Test phar
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-phar
- name: Test connection-center
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-connection-center
- name: Test database
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-database
- name: Test model
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-model
- name: Print logs
if: failure()
run: docker exec ${ENV_SERVICE} php .github/print-logs.php
daily-test-2_1:
name: 2.1_Linux PHP-${{ matrix.php }} Swoole-${{ matrix.swoole.version }} RoadRunner-${{ matrix.roadrunner }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
swoole:
- version: master
roadrunner: [2.7.*]
env:
ENV_SERVICE: php
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole.version }}
MYSQL_DOCKER_VERSION: "8.0"
REDIS_SERVER_HOST: redis
ROADRUNNER_DOCKER_VERSION: ${{ matrix.roadrunner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPOSER_ENV: --ignore-platform-reqs
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "2.1"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: /tmp/base_cache/composer
key: ${{ runner.os }}-daily-test-2.1-composer-${{ matrix.php }}-${{ hashFiles('*/composer.json', 'src/Components/*/composer.json') }}
restore-keys: |
${{ runner.os }}-daily-test-2.1-composer-${{ matrix.php }}-
${{ runner.os }}-daily-test-2.1-composer-
- name: Prepare
uses: ./.github/actions/ci-prepare
with:
env: ${{ env.ENV_SERVICE }}
- name: Test
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test
- name: Test swoole
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-swoole
- name: Test workerman
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman
- name: Test workerman-gateway
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman-gateway
- name: Test roadrunner
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-roadrunner
- name: Test fpm
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-fpm
- name: Test jwt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-jwt
- name: Test queue
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-queue
- name: Test amqp
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-amqp
- name: Test kafka
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-kafka
- name: Test grpc
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-grpc
- name: Test snowflake
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-snowflake
- name: Test mqtt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-mqtt
- name: Test smarty
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-smarty
- name: Test pgsql
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-pgsql
- name: Test phar
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-phar
- name: Print logs
if: failure()
run: docker exec ${ENV_SERVICE} php .github/print-logs.php