Add StringUtil::joinNonEmpty()
#52
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://help.github.com/en/categories/automating-your-workflow-with-github-actions | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
name: "Continuous Integration" | |
jobs: | |
composer-validate: | |
name: "Validate composer dependencies" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@master | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: 8.1 | |
- name: "Validate composer.json and composer.lock" | |
run: composer validate --strict | |
composer-normalize: | |
name: "Normalize composer.json" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: 8.1 | |
- name: "Install locked dependencies with composer" | |
run: composer install --no-interaction --no-progress --no-suggest | |
- name: "Run localheinz/composer-normalize" | |
run: composer normalize | |
- name: "Commit fixes" | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Normalize composer.json | |
php-cs-fixer: | |
name: "Fix PHP codestyle with php-cs-fixer" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: 8.1 | |
- name: "Install dependencies with composer" | |
run: composer install --no-interaction --no-progress --no-suggest | |
- name: "Run php-cs-fixer" | |
run: vendor/bin/php-cs-fixer fix | |
- name: "Commit fixes" | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Apply php-cs-fixer changes | |
static-code-analysis: | |
name: "Static Code Analysis" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@master | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: 8.1 | |
- name: "Install dependencies with composer" | |
run: composer install --no-interaction --no-progress --no-suggest | |
- name: "Run phpstan" | |
run: vendor/bin/phpstan analyse --configuration=phpstan.neon | |
tests: | |
name: "Tests - PHP ${{ matrix.php-version }}, Illuminate ${{ matrix.illuminate }}, ${{ matrix.dependencies }}" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: | |
- "7.4" | |
- "8.0" | |
- "8.1" | |
- "8.2" | |
dependencies: | |
- lowest | |
- highest | |
illuminate: | |
- ^8.73 | |
- ^9 | |
- ^10 | |
exclude: | |
- php-version: "7.4" | |
illuminate: ^9 | |
- php-version: "7.4" | |
illuminate: ^10 | |
- php-version: "8.0" | |
illuminate: ^10 | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@master | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: mbstring | |
php-version: "${{ matrix.php-version }}" | |
- name: "Install illuminate" | |
run: composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-update | |
- name: "Install lowest dependencies with composer" | |
if: matrix.dependencies == 'lowest' | |
run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest | |
- name: "Install highest dependencies with composer" | |
if: matrix.dependencies == 'highest' | |
run: composer update --no-interaction --no-progress --no-suggest | |
- name: "Run unit tests with phpunit/phpunit" | |
run: vendor/bin/phpunit | |
code-coverage: | |
name: "Code Coverage" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@master | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: pcov | |
extensions: mbstring | |
php-version: 8.1 | |
- name: "Install dependencies with composer" | |
run: composer install --no-interaction --no-progress --no-suggest | |
- name: "Collect code coverage with Xdebug and phpunit/phpunit" | |
run: vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml | |
- name: "Send code coverage report to codecov.io" | |
uses: codecov/codecov-action@v2 | |
mutation-tests: | |
name: "Mutation Tests" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@master | |
- name: "Install PHP with extensions" | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: pcov | |
extensions: mbstring | |
php-version: 8.1 | |
- name: "Install dependencies with composer" | |
run: composer install --no-interaction --no-progress --no-suggest | |
- name: "Run mutation tests with infection/infection" | |
run: vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=60 --min-msi=60 |