Skip to content

Commit

Permalink
run phpunit with code coverage only on php 7.2 and 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Mar 16, 2022
1 parent 9fea43a commit 537d45d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,22 @@ on:
branches: [ main ]

jobs:
phpunit:

phpunit-with-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ '7.2', '7.4', '8.0', '8.1' ]

php-version: [ '7.2', '7.4' ]
env:
CC_TEST_REPORTER_ID: d97623f98d0ee6b865c4432d52f50f8bb7f0774f4c06fdfa5dfa347e61abdb91

steps:
- uses: actions/checkout@v2

- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
Expand All @@ -37,16 +31,13 @@ jobs:
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: CodeClimate Reporter Setup
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run test suite
run: |
php vendor/bin/phpunit --coverage-clover clover.xml --coverage-text
Expand Down

0 comments on commit 537d45d

Please sign in to comment.