Skip to content

Commit

Permalink
Coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Mar 11, 2023
1 parent 8575980 commit a8e9e71
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/php.yml
Expand Up @@ -43,7 +43,8 @@ jobs:
# https://github.com/shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
# Should be the higest supported version, so we can use the newest tools
php-version: '8.2'
tools: composer:v2
extensions: ctype, spl

Expand Down Expand Up @@ -103,6 +104,7 @@ jobs:
# https://github.com/shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
# Should be the lowest supported version
php-version: '8.0'
extensions: ctype, spl
tools: composer:v2
Expand Down Expand Up @@ -183,19 +185,19 @@ jobs:
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run unit tests with coverage
if: ${{ matrix.php-versions == '8.1' }}
if: ${{ matrix.php-versions == '8.2' }}
run: vendor/bin/phpunit

- name: Run unit tests (no coverage)
if: ${{ matrix.php-versions != '8.1' }}
if: ${{ matrix.php-versions != '8.2' }}
run: vendor/bin/phpunit --no-coverage

- name: Save coverage data
if: ${{ matrix.php-versions == '8.1' }}
if: ${{ matrix.php-versions == '8.2' }}
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: ${{ github.workspace }}/build
path: ${{ github.workspace }}

unit-tests-windows:
name: "Syntax and unit tests, PHP ${{ matrix.php-versions }}, ${{ matrix.operating-system }}"
Expand Down Expand Up @@ -255,7 +257,7 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: coverage-data
path: ${{ github.workspace }}/build
path: ${{ github.workspace }}

- name: Codecov
uses: codecov/codecov-action@v3
6 changes: 3 additions & 3 deletions codecov.yml
Expand Up @@ -6,13 +6,13 @@ coverage:
default:
target: 0%
threshold: 2%
patch: false
patch: off
comment:
layout: "diff"
behavior: once
require_changes: true
require_base: false
require_head: true
require_base: no
require_head: yes
branches: null
github_checks:
annotations: false
1 change: 0 additions & 1 deletion phpunit.xml
Expand Up @@ -13,5 +13,4 @@
<directory>./tests</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>

0 comments on commit a8e9e71

Please sign in to comment.