Fix docs #198
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
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'infection.json.dist' | |
- 'psalm.xml' | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'infection.json.dist' | |
- 'psalm.xml' | |
name: build | |
jobs: | |
tests: | |
name: PHP ${{ matrix.php }}-${{ matrix.os }} | |
env: | |
extensions: pdo, pdo_oci, oci8 | |
key: cache-v1 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
php: | |
- 7.4 | |
- 8.0 | |
- 8.1 | |
services: | |
oci: | |
image: wnameless/oracle-xe-11g-r2:latest | |
ports: | |
- 1521:1521 | |
options: --name=oci | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: ${{ env.extensions }} | |
ini-values: date.timezone='UTC' | |
coverage: pcov | |
tools: composer:v2 | |
- name: Determine composer cache directory on Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | |
- name: Cache dependencies installed with composer | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.COMPOSER_CACHE_DIR }} | |
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: | | |
php${{ matrix.php }}-composer- | |
- name: Update composer | |
run: composer self-update | |
- name: Install dependencies with composer | |
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | |
- name: Run tests with phpunit without coverage on PHP 8.0 | |
if: matrix.php == '8.0' || matrix.php == '8.1' | |
run: vendor/bin/phpunit --colors=always | |
- name: Run tests with phpunit and coverage on PHP 7.4 | |
if: matrix.php == '7.4' | |
run: vendor/bin/phpunit --coverage-clover=coverage.clover --colors=always | |
- name: Upload code coverage scrutinizer on Linux php 7.4 | |
if: matrix.php == '7.4' | |
run: | | |
wget https://scrutinizer-ci.com/ocular.phar | |
php ocular.phar code-coverage:upload --format=php-clover coverage.clover |