-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add QA tools and update code appropriately
- Loading branch information
Showing
10 changed files
with
3,767 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: "PHPUnit tests" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
ci: | ||
name: "CI checks" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "8.2" | ||
coverage: none | ||
tools: composer:v2 | ||
|
||
- name: "Cache dependencies" | ||
uses: "actions/cache@v2" | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-8.2" | ||
restore-keys: "php-8.2" | ||
|
||
- name: "Install dependencies" | ||
run: "composer update --no-interaction --no-progress --no-suggest" | ||
|
||
- name: "Lint" | ||
run: ./vendor/bin/phplint NumberToWords.php test | ||
|
||
- name: "PHPCS" | ||
run: ./vendor/bin/phpcs | ||
|
||
- name: "PHPStan" | ||
run: ./vendor/bin/phpstan --configuration=phpstan.neon | ||
|
||
- name: "PHPUnit" | ||
run: ./vendor/bin/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
vendor/ | ||
/vendor/ | ||
/coverage/ | ||
/.phplint.cache | ||
/.phpunit.cache | ||
/.phpunit.result.cache |
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,19 @@ | ||
.PHONY: * | ||
|
||
list: | ||
@grep -E '^[a-zA-Z%_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-24s\033[0m %s\n", $$1, $$2}' | ||
|
||
check: lint cs phpstan test ## check lint, code style and static analysis using the PHP within Docker | ||
|
||
lint: | ||
./vendor/bin/phplint NumberToWords.php test | ||
|
||
cs: | ||
./vendor/bin/phpcs | ||
|
||
phpstan: | ||
./vendor/bin/phpstan --configuration=phpstan.neon | ||
|
||
test: | ||
XDEBUG_MODE=coverage php ./vendor/bin/phpunit --coverage-html 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
Oops, something went wrong.