This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dev dependencies, pipelines and Scrutinizer
- Loading branch information
1 parent
3c5a606
commit 8b1fb74
Showing
8 changed files
with
158 additions
and
120 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,15 @@ | ||
on: | ||
- pull_request | ||
- push | ||
|
||
name: backwards compatibility | ||
jobs: | ||
roave_bc_check: | ||
name: Roave BC Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: fetch tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Roave BC Check | ||
uses: docker://nyholm/roave-bc-check-ga |
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 |
---|---|---|
|
@@ -9,7 +9,6 @@ jobs: | |
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
env: | ||
extensions: dom, json | ||
key: cache-v1 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
@@ -28,26 +27,10 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup cache environment | ||
id: cache-env | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ env.extensions }} | ||
key: ${{ env.key }} | ||
|
||
- name: Cache 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 | ||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: ${{ env.extensions }} | ||
ini-values: date.timezone='UTC' | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
@@ -68,24 +51,16 @@ jobs: | |
restore-keys: | | ||
php${{ matrix.php }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer php 7.4 | ||
if: matrix.php == '7.4' | ||
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Install dependencies with composer php 8.0 | ||
if: matrix.php == '8.0' | ||
run: composer install --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Run tests with phpunit and coverage on Linux php 7.4 | ||
if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4' | ||
run: vendor/bin/phpunit --coverage-clover=coverage.clover --colors=always | ||
|
||
- name: Run tests with phpunit without coverage | ||
if: matrix.os != 'ubuntu-latest' || matrix.php != '7.4' | ||
- name: Run tests with phpunit | ||
run: vendor/bin/phpunit --colors=always | ||
|
||
- name: Upload code coverage scrutinizer on Linux php 7.4 | ||
if: matrix.os == 'ubuntu-latest' && matrix.php == '7.4' | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
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,57 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
name: mutation test | ||
|
||
jobs: | ||
mutation: | ||
name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php: | ||
- "7.4" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php }}" | ||
ini-values: memory_limit=-1 | ||
coverage: "pcov" | ||
tools: composer:v2 | ||
|
||
- name: Determine composer cache directory | ||
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php }}-composer- | ||
- name: Update composer | ||
run: composer self-update | ||
|
||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
- name: Run infection | ||
run: | | ||
git fetch --depth=1 origin $GITHUB_BASE_REF | ||
vendor/bin/roave-infection-static-analysis-plugin -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered | ||
env: | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
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,18 +1,36 @@ | ||
checks: | ||
php: true | ||
|
||
filter: | ||
paths: | ||
- "src/*" | ||
|
||
build: | ||
environment: | ||
php: "7.4.12" | ||
nodes: | ||
analysis: | ||
environment: | ||
php: 7.4.12 | ||
|
||
tests: | ||
override: | ||
- php-scrutinizer-run | ||
filter: | ||
paths: | ||
- "src/*" | ||
checks: | ||
php: true | ||
tools: | ||
php_code_coverage: | ||
enabled: true | ||
external_code_coverage: | ||
timeout: 600 | ||
|
||
tests-and-coverage: | ||
environment: | ||
php: 7.4.12 | ||
|
||
dependencies: | ||
override: | ||
- composer self-update | ||
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
||
tests: | ||
override: | ||
- | ||
command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml" | ||
on_node: 1 | ||
coverage: | ||
file: coverage.xml | ||
format: php-clover | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"logs": { | ||
"text": "php:\/\/stderr", | ||
"badge": { | ||
"branch": "master" | ||
} | ||
}, | ||
"mutators": { | ||
"@default": true | ||
} | ||
} |