Skip to content

Commit

Permalink
Testing setup PHP: working version 1 - using only phpunit-polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Sep 21, 2021
1 parent 40a1261 commit 342ad9b
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,16 @@ jobs:
fi
- name: Set up PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@develop
with:
php-version: ${{ matrix.php }}
coverage: ${{ steps.set_cov.outputs.COV }}
ini-values: sendmail_path=/usr/sbin/sendmail -t -i, error_reporting=E_ALL, display_errors=On
extensions: imap, mbstring, intl, ctype, filter, hash
tools: phpunit-polyfills

# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install PHP packages - normal
if: ${{ matrix.php != '8.1' }}
uses: "ramsey/composer-install@v1"

- name: Install PHP packages - ignore-platform-reqs
if: ${{ matrix.php == '8.1' }}
uses: "ramsey/composer-install@v1"
with:
composer-options: --ignore-platform-reqs
- name: Dump autoload
run: composer dump-autoload --dev

# Install postfix and automatically retry if the install failed, which happens reguarly.
# @link https://github.com/marketplace/actions/retry-step
Expand All @@ -155,11 +147,11 @@ jobs:
- name: Run tests, no code coverage
if: ${{ matrix.coverage == false }}
run: ./vendor/bin/phpunit --no-coverage
run: phpunit --no-coverage

- name: Run tests with code coverage
if: ${{ matrix.coverage == true }}
run: vendor/bin/phpunit
run: phpunit

- name: Send coverage report to Codecov
if: ${{ success() && matrix.coverage == true }}
Expand Down

0 comments on commit 342ad9b

Please sign in to comment.