From b1b404d92f18533c4ccea990b05aa5a044af277a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Thu, 6 Oct 2022 14:55:05 +0200 Subject: [PATCH] Update test suite to future-proof base images --- .github/workflows/ci.yml | 25 ++++++++++++++----------- tests/TcpConnectorTest.php | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c14a96cc..05134d69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 - - windows-2019 + - ubuntu-22.04 + - windows-2022 php: - 8.2 - 8.1 @@ -27,7 +27,7 @@ jobs: - 5.4 - 5.3 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -43,7 +43,7 @@ jobs: runs-on: macos-12 continue-on-error: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: shivammathur/setup-php@v2 with: php-version: 8.1 @@ -53,13 +53,16 @@ jobs: PHPUnit-hhvm: name: PHPUnit (HHVM) - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 continue-on-error: true steps: - - uses: actions/checkout@v2 - - uses: azjezz/setup-hhvm@v1 + - uses: actions/checkout@v3 + - run: cp `which composer` composer.phar && ./composer.phar self-update --2.2 # downgrade Composer for HHVM + - name: Run hhvm composer.phar install + uses: docker://hhvm/hhvm:3.30-lts-latest with: - version: lts-3.30 - - run: composer self-update --2.2 # downgrade Composer for HHVM - - run: hhvm $(which composer) install - - run: hhvm vendor/bin/phpunit + args: hhvm composer.phar install + - name: Run hhvm vendor/bin/phpunit + uses: docker://hhvm/hhvm:3.30-lts-latest + with: + args: hhvm vendor/bin/phpunit diff --git a/tests/TcpConnectorTest.php b/tests/TcpConnectorTest.php index 0973f726..1388c224 100644 --- a/tests/TcpConnectorTest.php +++ b/tests/TcpConnectorTest.php @@ -109,7 +109,7 @@ public function connectionToTcpServerShouldFailIfFileDescriptorsAreExceeded() } // each file descriptor takes ~600 bytes of memory, so skip test if this would exceed memory_limit - if ($ulimit * 600 > $memory) { + if ($ulimit * 600 > $memory || $ulimit > 100000) { $this->markTestSkipped('Test requires ~' . round($ulimit * 600 / 1024 / 1024) . '/' . round($memory / 1024 / 1024) . ' MiB memory with ' . $ulimit . ' file descriptors'); }