forked from leanphp/phpspec-code-coverage
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from friends-of-phpspec/phpunit-10
Add compatibility with PHPUnit 10.
- Loading branch information
Showing
6 changed files
with
92 additions
and
52 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 |
---|---|---|
|
@@ -8,14 +8,14 @@ name: "Continuous Integration" | |
|
||
jobs: | ||
run: | ||
name: "Grumphp" | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
fail-fast: false | ||
fail-fast: true | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macOS-latest] | ||
php-versions: ['7.3', '7.4', '8.0', '8.1'] | ||
composer-versions: ['composer:v1', 'composer:v2'] | ||
dependencies: ["lowest", "highest"] | ||
|
||
steps: | ||
- name: Set git to use LF | ||
|
@@ -26,14 +26,14 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
fetch-depth: 10 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: ${{ matrix.composer-versions }} | ||
extensions: mbstring, xdebug, pcov | ||
extensions: xdebug | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
|
@@ -46,17 +46,13 @@ jobs: | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader | ||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: Run tests | ||
run: | | ||
composer run analyse | ||
composer run lint | ||
composer run test | ||
- name: Send Scrutinizer data | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml | ||
continue-on-error: true |
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,49 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
name: "Test Coverage" | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 10 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
extensions: pcov | ||
|
||
- 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.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: "Install dependencies" | ||
uses: "ramsey/composer-install@v2" | ||
|
||
- name: Run tests | ||
run: composer run test-coverage | ||
|
||
- name: Upload Scrutinizer coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover coverage/clover.xml" |
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,10 @@ | ||
parameters: | ||
level: 8 | ||
reportUnmatchedIgnoredErrors: false | ||
paths: | ||
- src | ||
ignoreErrors: | ||
# phpstan has hard time to check whenever we are using PHPUnit 10 or PHPUnit 9 | ||
- | ||
message: '#Class SebastianBergmann\\CodeCoverage\\Report\\Text constructor invoked with 4 parameters, 1-3 required\.#' | ||
path: ./src/CodeCoverageExtension.php |
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