-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated dev dependencies & php version to 7.4
- Loading branch information
Showing
8 changed files
with
136 additions
and
66 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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
/build export-ignore | ||
/.github export-ignore | ||
/tests export-ignore | ||
/vendor export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
phpunit.xml.dist export-ignore | ||
cs-fixer.php.dist export-ignore |
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,110 @@ | ||
name: build | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
full-build: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ["7.4"] | ||
env: | ||
extensions: pcov, dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter | ||
key: cache-v2 | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
- name: "Setup PHP extensions cache environment" | ||
id: cache-env | ||
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.cache-env.outputs.dir }} | ||
key: ${{ steps.cache-env.outputs.key }} | ||
restore-keys: ${{ steps.cache-env.outputs.key }} | ||
- name: "Install PHP with extensions" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: pcov | ||
extensions: ${{ env.extensions }} | ||
ini-values: assert.exception=1, zend.assertions=1 | ||
- name: "Validate composer.json" | ||
run: composer validate | ||
- name: "Set composer cache directory" | ||
id: composer-cache-full-build | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: "Setup composer cache" | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache-full-build.outputs.dir }} | ||
key: ${{ runner.os }}-composer-full-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer-full- | ||
- name: "Install highest dependencies" | ||
run: composer update --no-interaction --no-ansi --no-progress --no-suggest --prefer-stable | ||
- name: "Coding standard Php-CS-Fixer checks" | ||
run: vendor/bin/php-cs-fixer --dry-run -v --config=cs-fixer.php.dist --path-mode=intersection fix src tests | ||
- name: "Coding standard CodeSniffer checks" | ||
run: | | ||
vendor/bin/phpcs --extensions=php --standard=vendor/polymorphine/dev/phpcs.xml src | ||
vendor/bin/phpcs --extensions=php --standard=vendor/polymorphine/dev/phpcs.xml tests | ||
- name: "Run PhpUnit tests with coverage" | ||
run: | | ||
mkdir -p build/logs | ||
vendor/bin/phpunit --coverage-clover build/logs/clover.xml | ||
- name: "Send coverage report to coveralls.io" | ||
run: vendor/bin/php-coveralls -v | ||
env: | ||
COVERALLS_RUN_LOCALLY: 1 | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
lowest-build: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest] | ||
php-versions: ["7.4"] | ||
env: | ||
extensions: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter | ||
key: cache-v2 | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
- name: "Setup PHP extensions cache environment" | ||
id: cache-env | ||
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.cache-env.outputs.dir }} | ||
key: ${{ steps.cache-env.outputs.key }} | ||
restore-keys: ${{ steps.cache-env.outputs.key }} | ||
- name: "Install PHP with extensions" | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
extensions: ${{ env.extensions }} | ||
ini-values: assert.exception=1, zend.assertions=1 | ||
- name: "Set composer cache directory" | ||
id: composer-cache-lowest-build | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- name: "Setup composer cache" | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache-lowest-build.outputs.dir }} | ||
key: ${{ runner.os }}-composer-low-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer-low- | ||
- name: "Install lowest dependencies" | ||
run: composer update --no-interaction --no-ansi --no-progress --no-suggest --prefer-stable --prefer-lowest | ||
- name: "Run PhpUnit tests (no coverage)" | ||
run: vendor/bin/phpunit --no-coverage |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea/ | ||
vendor/ | ||
build/ | ||
temp/ | ||
/composer.lock |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<?php | ||
|
||
use Polymorphine\CodeStandards\FixerFactory; | ||
/* | ||
* This file is part of Polymorphine/Headers package. | ||
* | ||
* (c) Shudd3r <q3.shudder@gmail.com> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
use Polymorphine\Dev\FixerFactory; | ||
|
||
return FixerFactory::createFor('Polymorphine/Headers', __DIR__); |
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 |
---|---|---|
@@ -1,27 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.0/phpunit.xsd" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd" | ||
cacheResultFile="temp/.phpunit.result.cache" | ||
colors="true" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<php> | ||
<ini name="error_reporting" value="-1" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="Polymorphine\Headers tests"> | ||
<testsuite name="Polymorphine/Headers tests"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<coverage> | ||
<include> | ||
<directory>./src/</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log type="coverage-clover" target="build/logs/clover.xml"/> | ||
<log type="coverage-text" target="php://stdout" showOnlySummary="true"/> | ||
</logging> | ||
</include> | ||
</coverage> | ||
</phpunit> |