github-actions(deps): Bump actions/cache from 3 to 4 #149
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
# https://docs.github.com/en/actions | |
name: "Integrate" | |
on: # yamllint disable-line rule:truthy | |
pull_request: null | |
push: | |
branches: | |
- "master" | |
env: | |
PHP_EXTENSIONS: "mbstring" | |
jobs: | |
coding-standards: | |
name: "Coding Standards" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.1" | |
dependencies: | |
- "locked" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Lint YAML files" | |
uses: "ibiqlik/[email protected]" | |
with: | |
config_file: ".yamllint.yaml" | |
file_or_dir: "." | |
strict: true | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/[email protected]" | |
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@v4" | |
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: "Create cache directory for friendsofphp/php-cs-fixer" | |
run: "mkdir -p .build/php-cs-fixer" | |
- name: "Cache cache directory for friendsofphp/php-cs-fixer" | |
uses: "actions/cache@v4" | |
with: | |
path: ".build/php-cs-fixer" | |
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}" | |
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-" | |
- name: "Run friendsofphp/php-cs-fixer" | |
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose" | |
static-code-analysis: | |
name: "Static Code Analysis" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
phpunit-version: | |
- "6.0.0" | |
- "7.0.0" | |
- "8.0.0" | |
- "9.0.0" | |
dependencies: | |
- "lowest" | |
- "locked" | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/[email protected]" | |
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@v4" | |
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: "Require phpunit/phpunit" | |
run: "composer require --dev phpunit/phpunit:^${{ matrix.phpunit-version }} --update-with-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@v4" | |
with: | |
path: ".build/phpstan" | |
key: "php-${{ matrix.php-version }}-phpstan-${{ github.sha }}" | |
restore-keys: "php-${{ matrix.php-version }}-phpstan-" | |
- name: "Show phpstan/phpstan version" | |
run: "vendor/bin/phpstan --version" | |
- name: "Show phpunit/phpunit version" | |
run: "vendor/bin/phpunit --version" | |
- name: "Create cache directory for phpstan/phpstan" | |
run: "mkdir -p .build/phpstan" | |
- name: "Run phpstan/phpstan with extension" | |
run: "vendor/bin/phpstan analyse --configuration=phpstan-with-extension.neon --memory-limit=-1" | |
- name: "Run phpstan/phpstan without extension" | |
run: "vendor/bin/phpstan analyse --configuration=phpstan-without-extension.neon --memory-limit=-1" | |
tests: | |
name: "Tests" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
dependencies: | |
- "locked" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Install PHP with extensions" | |
uses: "shivammathur/[email protected]" | |
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@v4" | |
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 --configuration=phpunit.xml" |