-
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.
lifted minimum phpunit version to 10.1.x
- Loading branch information
Showing
7 changed files
with
102 additions
and
104 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 |
---|---|---|
@@ -1,87 +1,85 @@ | ||
name: CI | ||
name: "CI" | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
- 'LICENSE' | ||
branches: [ "main" ] | ||
pull_request: | ||
paths-ignore: | ||
- 'README.md' | ||
- 'LICENSE' | ||
- 'example' | ||
branches: [ "main" ] | ||
push: | ||
paths-ignore: | ||
- "README.md" | ||
- "LICENSE.md" | ||
branches: ["main"] | ||
pull_request: | ||
paths-ignore: | ||
- "README.md" | ||
- "LICENSE.md" | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
contents: "read" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 2 | ||
fail-fast: false | ||
matrix: | ||
php-version: [ | ||
"8.1", | ||
"8.2", | ||
"8.3", | ||
# also try a future version | ||
"8.4" | ||
] | ||
composer-param: [ | ||
"update --no-progress --prefer-dist --prefer-lowest", | ||
"update --no-progress --prefer-dist" | ||
] | ||
name: PHP ${{ matrix.php-version }} test | ||
steps: | ||
- name: checkout project | ||
uses: actions/checkout@v4 | ||
with: | ||
# needed by scrutinizer | ||
fetch-depth: 2 | ||
test: | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
max-parallel: 2 | ||
fail-fast: false | ||
matrix: | ||
php-version: [ | ||
"8.1", | ||
"8.2", | ||
"8.3", | ||
# also try a future version | ||
"8.4" | ||
] | ||
composer-param: [ | ||
"update --no-progress --prefer-dist --prefer-lowest", | ||
"update --no-progress --prefer-dist" | ||
] | ||
name: "PHP ${{ matrix.php-version }} test" | ||
steps: | ||
- name: "checkout project" | ||
uses: "actions/checkout@v4" | ||
with: | ||
# needed by scrutinizer | ||
fetch-depth: 2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: bcmath | ||
tools: composer:v2 | ||
# needed by PHPUnit code coverage | ||
coverage: pcov | ||
- name: "Setup PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: "bcmath" | ||
tools: "composer:v2" | ||
# needed by PHPUnit code coverage | ||
coverage: "pcov" | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate | ||
- name: "Validate composer.json and composer.lock" | ||
run: "composer validate" | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-dir)" >> $GITHUB_OUTPUT | ||
- name: "Get composer cache directory" | ||
id: "composer-cache" | ||
run: "echo \"dir=$(composer config cache-dir)\" >> $GITHUB_OUTPUT" | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
- name: "Cache composer dependencies" | ||
uses: "actions/cache@v3" | ||
with: | ||
path: "${{ steps.composer-cache.outputs.dir }}" | ||
key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}" | ||
restore-keys: "${{ runner.os }}-composer-" | ||
|
||
- name: Install dependencies | ||
run: composer ${{ matrix.composer-param }} | ||
- name: "Install dependencies" | ||
run: "composer ${{ matrix.composer-param }}" | ||
|
||
# Run phpunit with code coverage | ||
- name: PHPUnit Tests | ||
run: vendor/bin/phpunit --coverage-clover=coverage.clover | ||
# Run phpunit with code coverage | ||
- name: "PHPUnit Tests" | ||
run: "vendor/bin/phpunit --coverage-clover=coverage.clover" | ||
|
||
# Uploading reports for analysis | ||
- name: Upload code-coverage to scrutinizer | ||
run: vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover | ||
|
||
- name: Publish code coverage to Code Climate | ||
uses: paambaati/codeclimate-action@v5 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageLocations: | | ||
coverage.clover:clover | ||
# Uploading reports for analysis | ||
- name: "Upload code-coverage to scrutinizer" | ||
run: "vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover" | ||
|
||
- name: "Publish code coverage to Code Climate" | ||
uses: "paambaati/codeclimate-action@v5" | ||
env: | ||
CC_TEST_REPORTER_ID: "${{ secrets.CC_TEST_REPORTER_ID }}" | ||
with: | ||
coverageLocations: | | ||
coverage.clover:clover | ||
# vim: syntax=yaml ts=2 sw=2 et sr softtabstop=2 autoindent |
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,28 +1,27 @@ | ||
imports: | ||
- php | ||
- "php" | ||
|
||
filter: | ||
paths: [src/*] | ||
excluded_paths: [test/*] | ||
paths: ["src/*"] | ||
excluded_paths: ["test/*"] | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 600 | ||
php_mess_detector: true | ||
php_code_sniffer: | ||
enabled: true | ||
config: | ||
standard: psr1 | ||
sensiolabs_security_checker: true | ||
#php_code_coverage: true | ||
php_pdepend: true | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: [tests] | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: [tests] | ||
external_code_coverage: | ||
timeout: 600 | ||
php_mess_detector: true | ||
php_code_sniffer: | ||
enabled: true | ||
config: | ||
standard: "psr1" | ||
sensiolabs_security_checker: true | ||
# php_code_coverage: true | ||
php_pdepend: true | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: ["tests"] | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: ["tests"] | ||
|
||
before_commands: | ||
- composer install | ||
|
||
- "composer install" |
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 |
---|---|---|
|
@@ -59,6 +59,7 @@ rules: | |
allowed-values: | ||
- "false" | ||
- "true" | ||
- "on" | ||
|
||
yaml-files: | ||
- "*.yaml" | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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