-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create php.yml * Test code coverage with PCOV. * Adds ext-pcov. * Adds multiple versions of php and OS. * Removes coveralls. * Specifies version for pcov and cache. * Adds phpunit configuration for pcov. * Ignore tests/logs directory for phpcs test. * Restricts GH actions to PHP >= 7.3. * Tidies up phpunit.
- Loading branch information
Showing
3 changed files
with
72 additions
and
4 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,59 @@ | ||
name: PHP Composer | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, macos-latest] | ||
php-versions: ['7.3', '7.4'] | ||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl | ||
ini-values: post_max_size=256M, short_open_tag=On | ||
|
||
|
||
- name: Setup PHP with pecl extension | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: pecl | ||
extensions: pcov | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php-${{ matrix.php-versions }}- | ||
- name: Install dependencies | ||
if: steps.composer-cache.outputs.cache-hit != 'true' | ||
run: composer install --prefer-source --no-progress --no-suggest --no-interaction | ||
|
||
- name: Setup PCOV | ||
run: | | ||
composer require pcov/clobber | ||
vendor/bin/pcov clobber | ||
- name: Run test suite | ||
run: composer run-script test | ||
|
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