-
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.
Merge pull request #15 from tiny-blocks/release/2.3.0
- Loading branch information
Showing
19 changed files
with
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,49 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
PHP_VERSION: '8.3' | ||
|
||
jobs: | ||
auto-review: | ||
name: Auto review | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use PHP 8.2 | ||
- name: Configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
php-version: ${{ env.PHP_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: composer update --no-progress --optimize-autoloader | ||
|
||
- name: Run phpcs | ||
run: composer phpcs | ||
|
||
- name: Run phpmd | ||
run: composer phpmd | ||
- name: Run review | ||
run: composer review | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use PHP 8.2 | ||
- name: Use PHP ${{ env.PHP_VERSION }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
php-version: ${{ env.PHP_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: composer update --no-progress --optimize-autoloader | ||
|
||
- name: Run unit tests | ||
env: | ||
XDEBUG_MODE: coverage | ||
run: composer test | ||
|
||
- name: Run mutation tests | ||
run: composer test-mutation | ||
- name: Run tests | ||
run: composer tests |
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,22 @@ | ||
DOCKER_RUN = docker run --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.2 | ||
DOCKER_RUN = docker run --rm -it --net=host -v ${PWD}:/app -w /app gustavofreze/php:8.3 | ||
|
||
.PHONY: configure test test-file test-no-coverage review fix-style show-reports clean | ||
.PHONY: configure test test-no-coverage review show-reports clean | ||
|
||
configure: | ||
@${DOCKER_RUN} composer update --optimize-autoloader | ||
|
||
test: | ||
@${DOCKER_RUN} composer tests | ||
|
||
test-file: | ||
@${DOCKER_RUN} composer tests-file-no-coverage ${FILE} | ||
|
||
test-no-coverage: | ||
@${DOCKER_RUN} composer tests-no-coverage | ||
|
||
review: | ||
@${DOCKER_RUN} composer review | ||
|
||
fix-style: | ||
@${DOCKER_RUN} composer fix-style | ||
|
||
show-reports: | ||
@sensible-browser report/coverage/coverage-html/index.html report/coverage/mutation-report.html | ||
|
||
clean: | ||
@sudo chown -R ${USER}:${USER} ${PWD} | ||
@rm -rf report vendor | ||
@rm -rf report vendor .phpunit.cache .lock |
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,22 +1,23 @@ | ||
{ | ||
"timeout": 10, | ||
"testFramework": "phpunit", | ||
"logs": { | ||
"text": "report/infection/logs/infection-text.log", | ||
"summary": "report/infection/logs/infection-summary.log" | ||
}, | ||
"tmpDir": "report/infection/", | ||
"minMsi": 100, | ||
"timeout": 30, | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"logs": { | ||
"text": "report/infection/logs/infection-text.log", | ||
"summary": "report/infection/logs/infection-summary.log" | ||
}, | ||
"mutators": { | ||
"@default": true, | ||
"PublicVisibility": false | ||
}, | ||
"phpUnit": { | ||
"configDir": "", | ||
"customPath": "./vendor/bin/phpunit" | ||
} | ||
}, | ||
"mutators": { | ||
"@default": true | ||
}, | ||
"minCoveredMsi": 100, | ||
"testFramework": "phpunit" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TinyBlocks\Country; | ||
|
||
/** | ||
* Defines the contract for classes representing alpha codes of countries. | ||
*/ | ||
interface AlphaCode | ||
{ | ||
/** | ||
* Gets the name associated with the alpha code. | ||
* | ||
* @return string The name of the country or region corresponding to the code. | ||
*/ | ||
public function getName(): 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 was deleted.
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
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
Oops, something went wrong.