Skip to content

Commit

Permalink
Update test suite to future-proof base images
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Oct 11, 2022
1 parent 81e1b4d commit 0a19b05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- windows-2019
- ubuntu-22.04
- windows-2022
php:
- 8.2
- 8.1
Expand Down Expand Up @@ -53,13 +53,11 @@ jobs:

PHPUnit-hhvm:
name: PHPUnit (HHVM)
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
container: hhvm/hhvm:3.30-lts-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: azjezz/setup-hhvm@v1
with:
version: lts-3.30
- run: composer self-update --2.2 # downgrade Composer for HHVM
- run: hhvm $(which composer) install
- uses: actions/checkout@v1
- run: curl -O https://getcomposer.org/download/latest-2.2.x/composer.phar
- run: hhvm composer.phar install
- run: hhvm vendor/bin/phpunit
2 changes: 1 addition & 1 deletion tests/TcpConnectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 0a19b05

Please sign in to comment.