feature: bump compat nesbot/carbon to 3.* #10
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: Run tests | |
on: [push, pull_request] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
operating-system: ['ubuntu-latest'] | |
php-versions: ['7.4'] | |
phpunit-versions: ['latest'] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, xml, ctype, iconv, intl, ast | |
coverage: xdebug | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Run phpunit | |
run: php vendor/bin/phpunit --stop-on-failure --testsuite unit-tests --coverage-clover clover.xml | |
- name: Run mess detector | |
run: php vendor/bin/phpmd src/ ansi phpmd.xml | |
- name: Run code sniffer | |
run: php vendor/bin/phpcs src/ tests/ --colors -p | |
- name: Send test coverage to codecov.io | |
uses: codecov/codecov-action@v2.1.0 | |
with: | |
files: clover.xml | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |