Skip to content

Detect dependencies in catch blocks #455

Detect dependencies in catch blocks

Detect dependencies in catch blocks #455

Workflow file for this run

# https://docs.github.com/en/actions
name: "Integrate"
on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- "main"
- "master"
- "v*"
env:
PHP_EXTENSIONS: "json, simplexml"
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer check --config ./ci/php-cs-fixer.php"
architecture-analysis:
name: "Architecture analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Run phpstan+phpat for architecture tests"
run: "vendor/bin/phpstan analyse -c ci/phpstan-phpat.neon"
static-code-analysis:
name: "Static Code Analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Run phpstan/phpstan"
run: "vendor/bin/phpstan analyse -c ci/phpstan.neon"
- name: "Run vimeo/psalm"
run: "vendor/bin/psalm -c ci/psalm.xml"
tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""
- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Run tests with phpunit/phpunit"
run: "vendor/bin/phpunit tests/unit/rules/"