Add IBAN validator with QA workflows
PHP_CodeSniffer / PHP_CodeSniffer (push) Successful in 1m34s
PHPStan / PHPStan with PHP 8.5 prefer-lowest (push) Successful in 1m42s
PHPStan / PHPStan with PHP 8.1 prefer-stable (push) Successful in 1m56s
PHPStan / PHPStan with PHP 8.1 prefer-lowest (push) Successful in 1m56s
PHPStan / PHPStan with PHP 8.5 prefer-stable (push) Successful in 55s
PHPStan / PHPStan with PHP 8.6 prefer-source (push) Successful in 1m0s
PHPUnit / PHPUnit with PHP 8.1 prefer-lowest (push) Successful in 1m19s
PHPUnit / PHPUnit with PHP 8.1 prefer-stable (push) Successful in 1m23s
PHPUnit / PHPUnit with PHP 8.5 prefer-lowest (push) Successful in 55s
Smoke / Produce an output (push) Successful in 17s
PHPUnit / PHPUnit with PHP 8.5 prefer-stable (push) Successful in 57s
Smoke / Consume the output (push) Successful in 13s
PHPUnit / PHPUnit with PHP 8.6 prefer-source (push) Successful in 53s
PHP_CodeSniffer / PHP_CodeSniffer (push) Successful in 1m34s
PHPStan / PHPStan with PHP 8.5 prefer-lowest (push) Successful in 1m42s
PHPStan / PHPStan with PHP 8.1 prefer-stable (push) Successful in 1m56s
PHPStan / PHPStan with PHP 8.1 prefer-lowest (push) Successful in 1m56s
PHPStan / PHPStan with PHP 8.5 prefer-stable (push) Successful in 55s
PHPStan / PHPStan with PHP 8.6 prefer-source (push) Successful in 1m0s
PHPUnit / PHPUnit with PHP 8.1 prefer-lowest (push) Successful in 1m19s
PHPUnit / PHPUnit with PHP 8.1 prefer-stable (push) Successful in 1m23s
PHPUnit / PHPUnit with PHP 8.5 prefer-lowest (push) Successful in 55s
Smoke / Produce an output (push) Successful in 17s
PHPUnit / PHPUnit with PHP 8.5 prefer-stable (push) Successful in 57s
Smoke / Consume the output (push) Successful in 13s
PHPUnit / PHPUnit with PHP 8.6 prefer-source (push) Successful in 53s
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
name: PHP_CodeSniffer
|
||||
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.php'
|
||||
- tools/phpcs/composer.json
|
||||
- phpcs.xml.dist
|
||||
- .github/workflows/phpcs.yml
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
name: PHP_CodeSniffer
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
|
||||
with:
|
||||
php-version: 8.5
|
||||
coverage: none
|
||||
tools: cs2pr
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ hashFiles('tools/phpcs/composer.json') }}
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer composer-phpcs -- update --no-progress --prefer-dist
|
||||
|
||||
- name: Run PHP_CodeSniffer
|
||||
run: composer phpcs -- -q --report=checkstyle | cs2pr
|
||||
@@ -0,0 +1,83 @@
|
||||
name: PHPStan
|
||||
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.php'
|
||||
- composer.json
|
||||
- tools/phpstan/composer.json
|
||||
- phpstan.neon.dist
|
||||
- .github/workflows/phpstan.yml
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.5']
|
||||
prefer: ['prefer-stable', 'prefer-lowest']
|
||||
experimental: [false]
|
||||
include:
|
||||
- php-versions: 8.6
|
||||
prefer: prefer-source
|
||||
experimental: true
|
||||
name: PHPStan with PHP ${{ matrix.php-versions }} ${{ matrix.prefer }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('**/composer.json') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
MATRIX_EXPERIMENTAL: ${{ matrix.experimental }}
|
||||
MATRIX_PREFER: ${{ matrix.prefer }}
|
||||
run: |
|
||||
if [ "${MATRIX_PREFER}" = "prefer-lowest" ]; then
|
||||
export COMPOSER_NO_BLOCKING=1
|
||||
fi
|
||||
|
||||
if [ "${MATRIX_EXPERIMENTAL}" == "true" ]; then
|
||||
sed -E -i composer.json \
|
||||
-e 's/"minimum-stability":[^,]*/"minimum-stability": "dev"/' \
|
||||
-e 's/"prefer-stable":[^,]*/"prefer-stable": false/'
|
||||
export COMPOSER_IGNORE_PLATFORM_REQ="php+"
|
||||
fi
|
||||
|
||||
composer update --no-progress --${MATRIX_PREFER} --optimize-autoloader
|
||||
composer composer-phpunit -- update --no-progress --optimize-autoloader
|
||||
composer composer-phpstan -- update --no-progress --optimize-autoloader
|
||||
|
||||
- name: Run PHPStan
|
||||
run: composer phpstan -- analyse
|
||||
@@ -0,0 +1,93 @@
|
||||
name: PHPUnit
|
||||
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.php'
|
||||
- composer.json
|
||||
- tools/phpunit/composer.json
|
||||
- phpunit.xml.dist
|
||||
- .github/workflows/phpunit.yml
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
phpunit:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.5']
|
||||
prefer: ['prefer-stable', 'prefer-lowest']
|
||||
experimental: [false]
|
||||
include:
|
||||
- php-versions: 8.6
|
||||
prefer: prefer-source
|
||||
experimental: true
|
||||
name: PHPUnit with PHP ${{ matrix.php-versions }} ${{ matrix.prefer }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: bcmath, curl, fileinfo, gd, intl, mbstring, mysqli, xml, zip
|
||||
coverage: pcov
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-${{ hashFiles('**/composer.json') }}
|
||||
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
MATRIX_EXPERIMENTAL: ${{ matrix.experimental }}
|
||||
MATRIX_PREFER: ${{ matrix.prefer }}
|
||||
run: |
|
||||
if [ "${MATRIX_PREFER}" = "prefer-lowest" ]; then
|
||||
export COMPOSER_NO_BLOCKING=1
|
||||
fi
|
||||
|
||||
if [ "${MATRIX_EXPERIMENTAL}" == "true" ]; then
|
||||
sed -E -i composer.json \
|
||||
-e 's/"minimum-stability":[^,]*/"minimum-stability": "dev"/' \
|
||||
-e 's/"prefer-stable":[^,]*/"prefer-stable": false/'
|
||||
export COMPOSER_IGNORE_PLATFORM_REQ="php+"
|
||||
fi
|
||||
|
||||
composer update --no-progress --${MATRIX_PREFER} --optimize-autoloader
|
||||
composer composer-phpunit -- update --no-progress --optimize-autoloader
|
||||
|
||||
- name: Setup problem matchers for PHP
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: ${{ runner.tool_cache }}
|
||||
run: echo "::add-matcher::${RUNNER_TOOL_CACHE}/php.json"
|
||||
|
||||
- name: Setup problem matchers for PHPUnit
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: ${{ runner.tool_cache }}
|
||||
run: echo "::add-matcher::${RUNNER_TOOL_CACHE}/phpunit.json"
|
||||
|
||||
- name: Run PHPUnit
|
||||
run: composer phpunit
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Smoke
|
||||
|
||||
permissions: {}
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
greeting:
|
||||
description: 'Text passed from the first job to the second'
|
||||
required: false
|
||||
type: string
|
||||
default: hello
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
produce:
|
||||
runs-on: ubuntu-latest
|
||||
name: Produce an output
|
||||
outputs:
|
||||
greeting: ${{ steps.greeting.outputs.value }}
|
||||
|
||||
steps:
|
||||
- name: Show the runner
|
||||
run: |
|
||||
uname -a
|
||||
cat /etc/os-release
|
||||
id
|
||||
echo "event=${GITHUB_EVENT_NAME} ref=${GITHUB_REF} sha=${GITHUB_SHA}"
|
||||
echo "server=${GITHUB_SERVER_URL} repository=${GITHUB_REPOSITORY}"
|
||||
command -v sudo docker node php composer || true
|
||||
|
||||
- name: Set the output
|
||||
id: greeting
|
||||
env:
|
||||
INPUTS_GREETING: ${{ inputs.greeting || 'hello' }}
|
||||
run: echo "value=${INPUTS_GREETING} from ${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Write the step summary
|
||||
run: echo "### Smoke test ran on ${RUNNER_OS}" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
consume:
|
||||
runs-on: ubuntu-latest
|
||||
name: Consume the output
|
||||
needs: produce
|
||||
|
||||
steps:
|
||||
- name: Print the output of the first job
|
||||
env:
|
||||
GREETING: ${{ needs.produce.outputs.greeting }}
|
||||
run: |
|
||||
test -n "${GREETING}"
|
||||
echo "${GREETING}"
|
||||
Reference in New Issue
Block a user