Skip to content

Commit

Permalink
Merge pull request #299 from clue-labs/runs-on
Browse files Browse the repository at this point in the history
Update test suite to future-proof base images
  • Loading branch information
WyriHaximus committed Oct 15, 2022
2 parents 81e1b4d + b1b404d commit 8397f22
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 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,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
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 8397f22

Please sign in to comment.