CI #1473
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: CI | |
on: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
test: | |
name: PHPUnit (PHP ${{ matrix.php-versions }}) (${{ matrix.composer.name }} dependencies) | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['8.1', '8.2'] | |
composer: | |
- {name: "lowest", flags: " --prefer-dist --prefer-lowest"} | |
- {name: "stable", flags: " --prefer-dist --prefer-stable"} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.php-versions }}' | |
extensions: mbstring,intl,mongodb-mongodb/mongo-php-driver@master | |
tools: composer:v2 | |
- name: Install dependencies | |
run: | | |
composer update ${{ matrix.composer.flags }} | |
cd tools && composer install | |
- name: PHPUnit | |
run: composer test | |
static-analysis: | |
name: Static analysis (PHP ${{ matrix.php-versions }}) (${{ matrix.composer.name }} dependencies) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ['8.1', '8.2'] | |
composer: | |
- {name: "lowest", flags: " --prefer-dist --prefer-lowest"} | |
- {name: "stable", flags: " --prefer-dist --prefer-stable"} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '${{ matrix.php-versions }}' | |
extensions: mbstring,intl,mongodb | |
tools: composer:v2 | |
- name: Install dependencies | |
run: | | |
composer update ${{ matrix.composer.flags }} | |
cd tools && composer install | |
- name: PHPStan | |
run: composer phpstan | |
coding-style: | |
name: Coding style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: mbstring,intl,mongodb | |
tools: composer:v2 | |
- name: Get composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: | | |
composer update ${{ matrix.composer.flags }} | |
cd tools && composer install | |
- name: PHP CS Fixer | |
run: composer cs:lint |