composer(deps-dev): update setono/code-quality-pack requirement from ^1.4 to ^1.4 || ^2.0 #77
Workflow file for this run
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: build | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: ~ | |
env: | |
PHP_EXTENSIONS: "mbstring" | |
jobs: | |
coding-standards: | |
name: "Coding Standards" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
dependencies: | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- 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.1.2" | |
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 ergebnis/composer-normalize" | |
run: "composer normalize --dry-run" | |
- name: "Run symplify/easy-coding-standard" | |
run: "composer check-style" | |
dependency-analysis: | |
name: "Dependency Analysis" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
dependencies: | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
extensions: "${{ env.PHP_EXTENSIONS }}" | |
php-version: "${{ matrix.php-version }}" | |
tools: "composer-require-checker, composer-unused" | |
- name: "Determine composer cache directory" | |
uses: "./.github/actions/composer/composer/determine-cache-directory" | |
- name: "Cache dependencies installed with composer" | |
uses: "actions/cache@v2.1.2" | |
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 maglnet/composer-require-checker" | |
run: "composer-require-checker check" | |
- name: "Run icanhazstring/composer-unused" | |
run: "composer-unused" | |
static-code-analysis: | |
name: "Static Code Analysis" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
dependencies: | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- 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.1.2" | |
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: "Create cache directory for phpstan/phpstan" | |
run: "mkdir -p .build/phpstan" | |
- name: "Cache cache directory for phpstan/phpstan" | |
uses: "actions/cache@v2.1.2" | |
with: | |
path: ".build/phpstan" | |
key: "php-${{ matrix.php-version }}-phpstan-${{ github.sha }}" | |
restore-keys: "php-${{ matrix.php-version }}-phpstan-" | |
- name: "Run phpstan/phpstan" | |
run: "composer analyse" | |
tests: | |
name: "Tests" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
dependencies: | |
- "lowest" | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- 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.1.2" | |
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 unit tests with phpunit/phpunit" | |
run: "composer phpunit" | |
code-coverage: | |
name: "Code Coverage" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
dependencies: | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "pcov" | |
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.1.2" | |
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: "Collect code coverage with pcov and phpunit/phpunit" | |
run: "composer phpunit" | |
- name: "Send code coverage report to Codecov.io" | |
env: | |
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | |
run: "bash <(curl -s https://codecov.io/bash)" |