updated changelog #21
Workflow file for this run
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
name: Unit Tests | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
workflow_dispatch: | |
push: | |
branches: | |
- "!*" | |
tags: | |
- "v*" | |
jobs: | |
unit-tests: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: | |
- 'ubuntu-20.04' | |
php-versions: | |
- 7.3 | |
- 7.4 | |
- 8.0 | |
- 8.1 | |
- 8.2 | |
- 8.3 | |
phpunit-versions: ['latest'] | |
env: | |
extensions: mbstring, intl, xml, gmp, bcmath, snappy-kjdev/[email protected] | |
key: extcache-v1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup cache environment | |
id: extcache | |
uses: shivammathur/cache-extensions@v1 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
key: ${{ env.key }} | |
- name: Cache extensions | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.extcache.outputs.dir }} | |
key: ${{ steps.extcache.outputs.key }} | |
restore-keys: ${{ steps.extcache.outputs.key }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: ${{ env.extensions }} | |
# extensions: mbstring, intl, xml, gmp, bcmath, snappy-kjdev/[email protected] | |
coverage: xdebug # pcov is slower and sometimes failing due to memory limitations and a possible bug | |
tools: composer:v2, php-cs-fixer, phpstan, phpunit:${{ matrix.phpunit-versions }} | |
- name: Install dependencies and skip checks for platform requirements | |
if: matrix.COMPOSER_IGNORE_PLATFORM_REQS == 1 | |
run: composer update --ignore-platform-reqs | |
- name: Install dependencies | |
if: matrix.COMPOSER_IGNORE_PLATFORM_REQS != 1 | |
run: composer update | |
- name: Setup problem matchers for PHP | |
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
- name: Setup problem matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Unit Tests without Coverage | |
run: vendor/bin/phpunit --no-coverage tests | |
# - name: Unit Tests with Coverage | |
# run: vendor/bin/phpunit --coverage-clover=coverage.xml tests | |
# - name: PHPStan | |
# run: phpstan --version && phpstan analyse src |