adding new selector #185
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 checks | |
on: | |
# Run on PRs and pushes, only on significant changes. | |
push: | |
branches: | |
- develop | |
- main | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
# Prevent multiple unnecessary CI runs on the same branch. | |
# Link: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
phpcs: | |
name: PHPCS check on PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '7.4' ] | |
steps: | |
# Checkout repository | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Setup PHP versions, run checks | |
- name: PHP setup | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
tools: cs2pr | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Install dependencies and handle caching in one go. | |
# @link https://github.com/marketplace/actions/install-composer-dependencies | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
ignore-cache: "yes" | |
- name: Check coding standards using PHPCS | |
continue-on-error: true | |
run: composer test:standards -- --runtime-set testVersion ${{ matrix.php }}- --report-full --report-checkstyle=./phpcs-report.xml | |
- name: Show PHPCS results in PR | |
run: cs2pr ./phpcs-report.xml | |
phpstan: | |
name: PHPStan check | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.allowed_failure }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '7.4' ] | |
allowed_failure: [ true ] | |
steps: | |
# Checkout repository | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Setup PHP versions, run checks | |
- name: PHP setup | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Install dependencies and handle caching in one go. | |
# @link https://github.com/marketplace/actions/install-composer-dependencies | |
- name: Install Composer dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: highest | |
ignore-cache: "yes" | |
- name: Check code consistency using PHPStan | |
run: composer test:types |