Daily Test #418
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily Test | |
on: | |
schedule: | |
- cron: "0 16 * * *" # 这个值是 UTC 时间,每天北京时间 0 点执行 | |
push: | |
paths: | |
- ".github/workflows/daily-test.yml" | |
- ".github/docker-compose.yml" | |
- ".github/php.dockerfile" | |
- ".github/actions/ci-prepare" | |
pull_request: | |
paths: | |
- ".github/workflows/daily-test.yml" | |
- ".github/docker-compose.yml" | |
- ".github/php.dockerfile" | |
- ".github/actions/ci-prepare" | |
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 | |
- 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 |