-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add compatibility with Composer v2.3
- rewrite production autoload for compat with Composer v2.3 - refresh QA
- Loading branch information
Showing
16 changed files
with
150 additions
and
103 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,83 @@ | ||
name: Quality Assurance | ||
on: [push, pull_request] | ||
jobs: | ||
|
||
cross_version: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
|
||
strategy: | ||
matrix: | ||
php: [ '7.3', '7.4' ] | ||
tools: [ 'composer:v2', 'composer:v1' ] | ||
prefer: [ 'lowest', 'highest' ] | ||
ignore-platform: [ '' ] | ||
experimental: [ false ] | ||
include: | ||
- php: "8.0" | ||
prefer: "highest" | ||
ignore-platform: "--ignore-platform-reqs" | ||
experimental: true | ||
tools: "composer:v2" | ||
- php: "8.0" | ||
prefer: "highest" | ||
ignore-platform: "--ignore-platform-reqs" | ||
experimental: true | ||
tools: "composer:v1" | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
skip-jobs: | ||
required: true | ||
type: choice | ||
default: 'Run all' | ||
description: 'Choose jobs to run' | ||
options: | ||
- 'Run all' | ||
- 'Run static QA only' | ||
- 'Run static unit tests only' | ||
|
||
continue-on-error: ${{ matrix.experimental }} | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
jobs: | ||
static-qa: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, 'skip qa') || github.event.inputs.skip-jobs == 'Run static unit tests only' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: ${{ matrix.tools }} | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
coverage: none | ||
tools: cs2pr | ||
|
||
- name: Check syntax error in sources | ||
run: find ./src/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l | ||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Install dependencies | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: ${{ matrix.prefer }} | ||
composer-options: ${{ matrix.ignore-platform }} | ||
- name: Check code styles | ||
run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr | ||
|
||
qa: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip')" | ||
- name: Check Psalm | ||
run: ./vendor/bin/psalm --output-format=github --no-cache | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, 'skip tests') || github.event.inputs.skip-jobs == 'Run static QA only' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-ver: [ '7.3', '7.4', '8.0' ] | ||
composer: [ 'composer:2.0', 'composer:2.1', 'composer:2.2', 'composer:2.3', 'composer:v1' ] | ||
dependency-versions: [ 'lowest', 'highest' ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-ver }} | ||
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | ||
coverage: none | ||
tools: cs2pr, ${{ matrix.composer }} | ||
|
||
- name: Install dependencies | ||
uses: "ramsey/composer-install@v1" | ||
- name: Install parallel-lint | ||
if: ${{ matrix.dependency-versions == 'highest' }} | ||
run: composer require php-parallel-lint/php-parallel-lint:^1.3.1 --dev --no-update | ||
|
||
- name: Check cross-version PHP compatibility | ||
run: composer phpcompat | ||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: ${{ matrix.dependency-versions }} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
||
- name: Check code style | ||
run: composer cs | ||
- name: Lint PHP sources | ||
if: ${{ matrix.dependency-versions == 'highest' }} | ||
run: ./vendor/bin/parallel-lint ./src/ --checkstyle | cs2pr | ||
|
||
- name: Check Psalm | ||
run: composer psalm | ||
# TODO: Write tests... | ||
#- name: Run unit tests | ||
# run: ./vendor/bin/phpunit --no-coverage |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
|
||
final class EnsureGitIgnore | ||
{ | ||
|
||
/** | ||
* @param string $dir | ||
* @return bool | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ | |
|
||
class GitProcess | ||
{ | ||
|
||
/** | ||
* @var string | ||
*/ | ||
|
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
|
||
final class GenerateMuPluginsLoader implements Task | ||
{ | ||
|
||
/** | ||
* @var VipDirectories | ||
*/ | ||
|
Oops, something went wrong.