postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Hangs forever with Event library on Github Actions

Open PNixx opened this issue 1 year ago • 2 comments

Example file .github/workflows/testing.yml never finish. If remove extension event will be work correctly.

name: Testing

on:
  push:
    branches: [ '**' ]
  pull_request:
    branches: [ 'main' ]

jobs:
  postgres:
    name: Testing
    runs-on: ubuntu-latest

    strategy:
      fail-fast: true
      max-parallel: 1
      matrix:
        php-version: [ '8.2' ]

    env:
      extensions: sockets,pcntl,event

    services:
      postgres:
        image: postgres
        env:
          POSTGRES_PASSWORD: postgres
        ports:
          - 15432:5432
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - name: Set up PHP ${{ matrix.php-version }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: ${{ env.extensions }}
      - run: |
          echo '{"require": {"amphp/postgres": "^2.0"}}' > composer.json

      - name: Composer install
        run: composer install --no-progress --prefer-dist --optimize-autoloader

      - run: php -r 'require_once "vendor/autoload.php"; $pool = new \Amp\Postgres\PostgresConnectionPool(\Amp\Postgres\PostgresConfig::fromString("host=localhost user=postgres password=postgres port=15432")); print_r($pool->execute("SELECT 1")->fetchRow());'

PNixx avatar Sep 23 '24 20:09 PNixx