Skip to content

Commit

Permalink
Introduce a Makefile for easy command execution
Browse files Browse the repository at this point in the history
  • Loading branch information
stevegrunwell committed Aug 20, 2024
1 parent 46903d2 commit 53f51cd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
uses: ramsey/composer-install@v2

- name: Check coding standards
run: vendor/bin/php-cs-fixer fix --dry-run --verbose
run: make standards
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
uses: ramsey/composer-install@v2

- name: Run test suite
run: vendor/bin/phpunit --testdox
run: make unit-tests
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.php-cs-fixer.cache
.phpunit.result.cache
.vscode
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: *

build:
composer install

# Roll-up all of the test commands
test: unit-tests standards

# Check coding standards with PHP-CS-Fixer
standards:
vendor/bin/php-cs-fixer fix --dry-run --verbose

# Execute the PHPUnit test suite
unit-tests:
vendor/bin/phpunit --testdox --colors=always
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"archive": {
"exclude": [
".*",
"Makefile",
"phpunit.xml.dist",
"tests"
]
Expand Down

0 comments on commit 53f51cd

Please sign in to comment.