Skip to content

Add image tool

Add image tool #2

Workflow file for this run

name: "build"
on:
push:
branches:
- "*.x"
pull_request: ~
workflow_dispatch: ~
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
coverage: "none"
- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Validate composer"
run: "composer validate --strict"
- name: "Check composer normalized"
run: "composer normalize --dry-run"
- name: "Check style"
run: "composer check-style"
dependency-analysis:
name: "Dependency Analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
dependencies:
- "highest"
symfony:
- "~6.0.0"
- "~6.1.0"
- "~6.2.0"
- "~6.3.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "composer-require-checker, composer-unused, flex"
- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
- name: "Run maglnet/composer-require-checker"
run: "composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
- name: "Run composer-unused/composer-unused"
run: "composer-unused"
static-code-analysis:
name: "Static Code Analysis"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
dependencies:
- "highest"
symfony:
- "~6.0.0"
- "~6.1.0"
- "~6.2.0"
- "~6.3.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
coverage: "none"
tools: "flex"
- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
- name: "Static analysis"
run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}"
unit-tests:
name: "Unit tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
dependencies:
- "highest"
symfony:
- "~6.0.0"
- "~6.1.0"
- "~6.2.0"
- "~6.3.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP, with composer and extensions"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
coverage: "none"
tools: "flex"
- name: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
- name: "Run phpunit"
run: "composer phpunit"
code-coverage:
name: "Code Coverage"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.2"
dependencies:
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Setup PHP, with composer and 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: "Install composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml"
- name: "Send code coverage report to Codecov.io"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "bash <(curl -s https://codecov.io/bash)"