phpdoc #143
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
- 3.0/test | |
paths: | |
- '**.php' | |
- composer.lock | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
XDEBUG_MODE: coverage | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository | |
# 10 commits is an arbitrary value that is more than 1 commit | |
fetch-depth: 10 | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install --prefer-dist --no-progress | |
- name: Run test suite | |
run: php vendor/bin/phpunit | |
- run: composer require --dev scrutinizer/ocular | |
- name: Uploading code coverage | |
run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover.xml |