-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
full support to PHP 8.0 + add support for CurlHandle resource objects (…
…#71)
- Loading branch information
Showing
7 changed files
with
136 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
|
||
jobs: | ||
tests: | ||
if: "! contains(toJSON(github.event.commits.*.msg), 'skip') && ! contains(toJSON(github.event.commits.*.msg), 'ci')" #skip ci... | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-20.04] | ||
php-versions: ['7.2', '7.3', '7.4', '8.0'] | ||
include: | ||
- operating-system: ubuntu-16.04 | ||
php-versions: '7.1' | ||
COMPOSER_FLAGS: '--prefer-stable --prefer-lowest' | ||
COVERAGE: 'true' | ||
PHPUNIT_FLAGS: '--coverage-clover build/coverage.xml' | ||
|
||
name: PHP ${{ matrix.php-versions }} - ${{ matrix.operating-system }} | ||
|
||
env: | ||
extensions: curl json libxml dom | ||
key: cache-v1 # can be any string, change to clear the extension cache. | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu machine | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.extensions }} | ||
key: ${{ env.key }} | ||
|
||
- name: Cache PHP Extensions | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.extcache.outputs.dir }} | ||
key: ${{ steps.extcache.outputs.key }} | ||
restore-keys: ${{ steps.extcache.outputs.key }} | ||
|
||
- name: Cache Composer Dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP Action | ||
uses: shivammathur/setup-php@2.8.0 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.extensions }} | ||
coverage: xdebug | ||
tools: pecl, composer | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Composer self update | ||
run: composer self-update | ||
|
||
- name: Install Composer dependencies | ||
run: composer update ${{ matrix.COMPOSER_FLAGS }} --prefer-source --no-interaction | ||
|
||
- name: boot test server | ||
run: vendor/bin/http_test_server > /dev/null 2>&1 & | ||
|
||
- name: Apply tests | ||
run: composer test | ||
|
||
- name: Apply coverage | ||
if: ${{ matrix.COVERAGE == 'true' }} | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters