Fix a doc and update an example #9
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: Continuous Integration | |
on: | |
- push | |
- pull_request | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
include: | |
- operating-system: 'ubuntu-latest' | |
php-version: '8.1' | |
- operating-system: 'ubuntu-latest' | |
php-version: '8.2' | |
- operating-system: 'ubuntu-latest' | |
php-version: '8.3' | |
name: PHP ${{ matrix.php-version }} | |
runs-on: ${{ matrix.operating-system }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }} | |
restore-keys: | | |
composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}- | |
composer-${{ runner.os }}-${{ matrix.php-version }}- | |
composer-${{ runner.os }}- | |
composer- | |
- name: Install dependencies | |
run: composer install | |
- name: Run static analysis | |
run: composer stan | |
- name: Run tests | |
run: composer test |