generated from ergebnis/php-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #328 from ergebnis/fix/order
Fix: Order
- Loading branch information
Showing
2 changed files
with
92 additions
and
92 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
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 |
---|---|---|
|
@@ -14,8 +14,8 @@ env: | |
PHP_EXTENSIONS: "mbstring" | ||
|
||
jobs: | ||
coding-standards: | ||
name: "Coding Standards" | ||
code-coverage: | ||
name: "Code Coverage" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
|
@@ -31,22 +31,15 @@ jobs: | |
- name: "Checkout" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Lint YAML files" | ||
uses: "ibiqlik/action-yamllint@v3" | ||
with: | ||
config_file: ".yamllint.yaml" | ||
file_or_dir: "." | ||
strict: true | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
coverage: "pcov" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Validate composer.json and composer.lock" | ||
run: "composer validate --strict" | ||
- 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" | ||
|
@@ -63,24 +56,16 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run ergebnis/composer-normalize" | ||
run: "composer normalize --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/[email protected]" | ||
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: "Collect code coverage with pcov and phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/phpunit/logs/clover.xml" | ||
|
||
- name: "Run friendsofphp/php-cs-fixer" | ||
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose" | ||
- name: "Send code coverage report to Codecov.io" | ||
env: | ||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | ||
run: "bash <(curl -s https://codecov.io/bash)" | ||
|
||
dependency-analysis: | ||
name: "Dependency Analysis" | ||
coding-standards: | ||
name: "Coding Standards" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
|
@@ -96,13 +81,23 @@ jobs: | |
- name: "Checkout" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Lint YAML files" | ||
uses: "ibiqlik/action-yamllint@v3" | ||
with: | ||
config_file: ".yamllint.yaml" | ||
file_or_dir: "." | ||
strict: true | ||
|
||
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
extensions: "${{ env.PHP_EXTENSIONS }}" | ||
php-version: "${{ matrix.php-version }}" | ||
|
||
- name: "Validate composer.json and composer.lock" | ||
run: "composer validate --strict" | ||
|
||
- name: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
|
||
|
@@ -118,11 +113,24 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run maglnet/composer-require-checker" | ||
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json" | ||
- name: "Run ergebnis/composer-normalize" | ||
run: "composer normalize --dry-run" | ||
|
||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
- 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/[email protected]" | ||
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 --config=.php_cs --diff --diff-format=udiff --dry-run --verbose" | ||
|
||
dependency-analysis: | ||
name: "Dependency Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
|
@@ -160,36 +168,21 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Create cache directory for vimeo/psalm" | ||
run: "mkdir -p .build/psalm" | ||
|
||
- name: "Cache cache directory for vimeo/psalm" | ||
uses: "actions/[email protected]" | ||
with: | ||
path: ".build/psalm" | ||
key: "php-${{ matrix.php-version }}-psalm-${{ github.sha }}" | ||
restore-keys: "php-${{ matrix.php-version }}-psalm-" | ||
|
||
- name: "Run vimeo/psalm" | ||
run: "vendor/bin/psalm --config=psalm.xml --diff --shepherd --show-info=false --stats --threads=4" | ||
- name: "Run maglnet/composer-require-checker" | ||
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json" | ||
|
||
tests: | ||
name: "Tests" | ||
mutation-tests: | ||
name: "Mutation Tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.3" | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
|
||
dependencies: | ||
- "lowest" | ||
- "locked" | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
|
@@ -198,13 +191,10 @@ jobs: | |
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "none" | ||
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: "Determine composer cache directory" | ||
uses: "./.github/actions/composer/composer/determine-cache-directory" | ||
|
||
|
@@ -220,17 +210,11 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run auto-review tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml" | ||
|
||
- name: "Run unit tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml" | ||
|
||
- name: "Run integration tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml" | ||
- name: "Run mutation tests with pcov and infection/infection" | ||
run: "vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=${{ env.MIN_COVERED_MSI }} --min-msi=${{ env.MIN_MSI }}" | ||
|
||
code-coverage: | ||
name: "Code Coverage" | ||
static-code-analysis: | ||
name: "Static Code Analysis" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
|
@@ -249,13 +233,10 @@ jobs: | |
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "pcov" | ||
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" | ||
|
||
|
@@ -271,26 +252,36 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Collect code coverage with pcov and phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/phpunit/logs/clover.xml" | ||
- name: "Create cache directory for vimeo/psalm" | ||
run: "mkdir -p .build/psalm" | ||
|
||
- name: "Send code coverage report to Codecov.io" | ||
env: | ||
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | ||
run: "bash <(curl -s https://codecov.io/bash)" | ||
- name: "Cache cache directory for vimeo/psalm" | ||
uses: "actions/[email protected]" | ||
with: | ||
path: ".build/psalm" | ||
key: "php-${{ matrix.php-version }}-psalm-${{ github.sha }}" | ||
restore-keys: "php-${{ matrix.php-version }}-psalm-" | ||
|
||
mutation-tests: | ||
name: "Mutation Tests" | ||
- name: "Run vimeo/psalm" | ||
run: "vendor/bin/psalm --config=psalm.xml --diff --shepherd --show-info=false --stats --threads=4" | ||
|
||
tests: | ||
name: "Tests" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- "7.3" | ||
- "7.4" | ||
- "8.0" | ||
- "8.1" | ||
|
||
dependencies: | ||
- "lowest" | ||
- "locked" | ||
- "highest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
|
@@ -299,10 +290,13 @@ jobs: | |
- name: "Install PHP with extensions" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "pcov" | ||
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" | ||
|
||
|
@@ -318,5 +312,11 @@ jobs: | |
with: | ||
dependencies: "${{ matrix.dependencies }}" | ||
|
||
- name: "Run mutation tests with pcov and infection/infection" | ||
run: "vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=${{ env.MIN_COVERED_MSI }} --min-msi=${{ env.MIN_MSI }}" | ||
- name: "Run auto-review tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/AutoReview/phpunit.xml" | ||
|
||
- name: "Run unit tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml" | ||
|
||
- name: "Run integration tests with phpunit/phpunit" | ||
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml" |