Skip to content

Fix conflict version constraint #212

Fix conflict version constraint

Fix conflict version constraint #212

Workflow file for this run

# 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/action-yamllint@v3.1"
with:
config_file: ".yamllint.yaml"
file_or_dir: "."
strict: true
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@2.30.1"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --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 --ansi --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 --ansi --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
static-code-analysis:
name: "Static Code Analysis"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
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/setup-php@2.30.1"
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:^${{ matrix.phpunit-version }}"
run: "composer require phpunit/phpunit:^${{ matrix.phpunit-version }} --ansi --dev --update-with-dependencies"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- 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 --ansi --version"
- name: "Show phpunit/phpunit version"
run: "vendor/bin/phpunit --version"
- name: "Run phpstan/phpstan with extension"
run: "vendor/bin/phpstan analyse --ansi --configuration=phpstan-with-extension.neon --memory-limit=-1"
- name: "Run phpstan/phpstan without extension"
run: "vendor/bin/phpstan analyse --ansi --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/setup-php@2.30.1"
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"