Merge pull request #66 from ruudk/php82 #22
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: | |
push: | |
branches: | |
- "master" | |
jobs: | |
tests: | |
name: "Tests" | |
runs-on: "ubuntu-20.04" | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
dependencies: | |
- "lowest" | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
with: | |
fetch-depth: 2 | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php-version }}" | |
coverage: "pcov" | |
ini-values: "zend.assertions=1" | |
- name: "Install dependencies with Composer" | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Run PHPUnit" | |
run: "vendor/bin/phpunit --coverage-clover=coverage.xml" | |
- name: "Upload coverage file" | |
uses: "actions/upload-artifact@v2" | |
with: | |
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage" | |
path: "coverage.xml" | |
upload_coverage: | |
name: "Upload coverage to Codecov" | |
runs-on: "ubuntu-20.04" | |
needs: | |
- "tests" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
with: | |
fetch-depth: 2 | |
- name: "Download coverage files" | |
uses: "actions/download-artifact@v2" | |
with: | |
path: "reports" | |
- name: "Upload to Codecov" | |
uses: "codecov/codecov-action@v1" | |
with: | |
directory: reports | |
coding-standards: | |
name: "Coding Standards" | |
runs-on: "ubuntu-20.04" | |
strategy: | |
matrix: | |
php-version: | |
- "8.2" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
php-version: "${{ matrix.php-version }}" | |
tools: "cs2pr" | |
- name: "Install dependencies with Composer" | |
uses: "ramsey/composer-install@v2" | |
- name: "Install php-cs-fixer" | |
run: composer require "friendsofphp/php-cs-fixer:^3.23" | |
- name: "Run php-cs-fixer" | |
run: "vendor/bin/php-cs-fixer fix --diff --dry-run -v" |