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 12, 2022
1 parent 81e1b4d commit 73db2a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 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 All @@ -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 }}
Expand All @@ -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
Expand All @@ -53,13 +53,14 @@ 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: curl -O https://getcomposer.org/download/latest-2.2.x/composer.phar
- 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
- uses: docker://hhvm/hhvm:3.30-lts-latest
with:
args: 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 73db2a9

Please sign in to comment.