-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Enhance use of Makefile * use Makefile in TravisCI, so that the same scripts are used on the developers machine and during the CI pipeline * move test scripts to Makefile, so they can be executed in parallel for a faster test-result * add "clean" target to remove generated files * Make composer binaries available in PATH and test examples
- Loading branch information
1 parent
ed1afe1
commit 21ecfaf
Showing
11 changed files
with
138 additions
and
285 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ indent_style = space | |
indent_size = 4 | ||
charset = utf-8 | ||
|
||
[makefile] | ||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.yml] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: php | ||
|
||
php: | ||
- '7.4' | ||
|
||
script: | ||
- export PHPUNIT_FLAGS="--coverage-clover=coverage.xml" | ||
- make -j -O test | ||
|
||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) || true |
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,75 @@ | ||
MAKEFLAGS += --warn-undefined-variables | ||
SHELL := bash | ||
PATH := $(PATH):$(CURDIR)/vendor/bin | ||
|
||
.PHONY: test | ||
test: test-validate-composer test-code-style test-psalm test-phpunit test-examples test-composer-normalize | ||
|
||
.PHONY: test-code-style | ||
test-code-style: dependencies | ||
php-cs-fixer fix --dry-run --diff | ||
|
||
.PHONY: test-psalm | ||
test-psalm: dependencies | ||
psalm -m --no-progress | ||
|
||
.PHONY: test-phpunit | ||
test-phpunit: dependencies | ||
phpunit ${PHPUNIT_FLAGS} | ||
|
||
.PHONY: test-examples | ||
EXAMPLE_FILES := $(wildcard examples/*.php) | ||
test-examples: $(EXAMPLE_FILES) | ||
|
||
examples/example*.php: dependencies | ||
php $@ > /dev/null | ||
|
||
.PHONY: test-validate-composer | ||
test-validate-composer: | ||
composer validate | ||
|
||
.PHONY: test-composer-normalize | ||
test-composer-normalize: dependencies | ||
test-composer-normalize: | ||
composer normalize --dry-run --diff | ||
|
||
.PHONY: dependencies | ||
dependencies: | ||
composer install --no-interaction | ||
|
||
.PHONY: fix | ||
fix: fix-code-style fix-composer | ||
|
||
.PHONY: fix-code-style | ||
fix-code-style: dependencies | ||
fix-code-style: | ||
php-cs-fixer -- fix | ||
|
||
.PHONY: fix-composer | ||
fix-composer: dependencies | ||
fix-composer: | ||
composer normalize --no-update-lock | ||
|
||
.PHONY: docs | ||
docs: docs-dependencies docs-frontend-build | ||
php couscous.phar generate | ||
|
||
.PHONY: docs-dependencies | ||
docs-dependencies: | ||
if [ ! -f couscous.phar ]; then php -r "copy('https://github.com/CouscousPHP/Couscous/releases/download/1.7.3/couscous.phar', 'couscous.phar');"; fi | ||
|
||
.PHONY: docs-preview | ||
docs-preview: docs-dependencies docs-frontend-build | ||
php couscous.phar preview | ||
|
||
.PHONY: docs-frontend-dependencies | ||
docs-frontend-dependencies: | ||
cd website && yarn | ||
|
||
.PHONY: docs-frontend-build | ||
docs-frontend-build: docs-frontend-dependencies | ||
cd website && yarn build | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf vendor composer.lock .couscous website/node_modules website/template/static couscous.phar |
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,25 +1,31 @@ | ||
{ | ||
"name": "eluceo/ical", | ||
"description": "The eluceo/iCal package offers an abstraction layer for creating iCalendars. You can easily create iCal files by using PHP objects instead of typing your *.ics file by hand. The output will follow RFC 5545 as best as possible.", | ||
"license": "MIT", | ||
"keywords": [ | ||
"ical", | ||
"php calendar", | ||
"icalendar", | ||
"ics", | ||
"calendar" | ||
], | ||
"homepage": "https://github.com/markuspoerschke/iCal", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Markus Poerschke", | ||
"email": "[email protected]", | ||
"role": "Developer" | ||
} | ||
], | ||
"keywords": [ | ||
"ical", | ||
"php calendar", | ||
"icalendar", | ||
"ics", | ||
"calendar" | ||
], | ||
"support": { | ||
"issues": "https://github.com/markuspoerschke/iCal/issues", | ||
"source": "https://github.com/markuspoerschke/iCal" | ||
"require": { | ||
"php": ">=7.4", | ||
"ext-mbstring": "*" | ||
}, | ||
"require-dev": { | ||
"ergebnis/composer-normalize": "^2.2", | ||
"friendsofphp/php-cs-fixer": "^2.16", | ||
"phpunit/phpunit": "^8", | ||
"vimeo/psalm": "^3.7" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
@@ -31,24 +37,8 @@ | |
"Eluceo\\iCal\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": ">=7.4", | ||
"ext-mbstring": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^8", | ||
"vimeo/psalm": "^3.7", | ||
"friendsofphp/php-cs-fixer": "^2.16" | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"@test:code-style", | ||
"@test:psalm", | ||
"@test:phpunit" | ||
], | ||
"test:code-style": "php-cs-fixer fix --dry-run --diff", | ||
"test:psalm": "psalm", | ||
"test:phpunit": "phpunit", | ||
"fix:code-style": "php-cs-fixer fix" | ||
"support": { | ||
"issues": "https://github.com/markuspoerschke/iCal/issues", | ||
"source": "https://github.com/markuspoerschke/iCal" | ||
} | ||
} |
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.