Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
65 additions
and
99 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,7 +1,6 @@ | ||
.coveralls.yml export-ignore | ||
.github | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
Makefile export-ignore | ||
phpunit.xml.dist export-ignore | ||
tests/ export-ignore |
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,48 @@ | ||
name: test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
phpunit: | ||
name: phpunit | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
php-version: | ||
- "5.6" | ||
- "7.0" | ||
- "7.4" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: xdebug | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
tools: composer:v2 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.composer/cache | ||
vendor | ||
key: "php-${{ matrix.php-version }}" | ||
restore-keys: "php-${{ matrix.php-version }}" | ||
|
||
- name: Install dependencies | ||
run: composer install --no-interaction --no-progress | ||
|
||
- name: Run PHPUnit | ||
run: make test-coveralls | ||
|
||
- name: Upload code coverage | ||
if: ${{ matrix.php-version == '5.6' }} | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
composer global require php-coveralls/php-coveralls | ||
php-coveralls --coverage_clover=build/logs/clover.xml -v |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,26 @@ | ||
# customization | ||
|
||
PACKAGE_NAME = ICanBoogie/DateTime | ||
PACKAGE_VERSION = v1.2 | ||
PHPUNIT_VERSION = phpunit-5.7.phar | ||
PHPUNIT_FILENAME = build/$(PHPUNIT_VERSION) | ||
PHPUNIT = php $(PHPUNIT_FILENAME) | ||
PHPUNIT = vendor/bin/phpunit | ||
|
||
# do not edit the following lines | ||
|
||
all: $(PHPUNIT_FILENAME) vendor | ||
|
||
usage: | ||
@echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files." | ||
|
||
vendor: | ||
@composer install | ||
|
||
update: | ||
@composer update | ||
|
||
autoload: vendor | ||
@composer dump-autoload | ||
|
||
test-dependencies: $(PHPUNIT_FILENAME) vendor | ||
|
||
$(PHPUNIT_FILENAME): | ||
mkdir -p build | ||
wget https://phar.phpunit.de/$(PHPUNIT_VERSION) -O $(PHPUNIT_FILENAME) | ||
.PHONY: test-dependencies | ||
test-dependencies: vendor | ||
|
||
.PHONY: test | ||
test: test-dependencies | ||
@$(PHPUNIT) | ||
|
||
.PHONY: test-coverage | ||
test-coverage: test-dependencies | ||
@mkdir -p build/coverage | ||
@$(PHPUNIT) --coverage-html build/coverage | ||
|
||
.PHONY: test-coveralls | ||
test-coveralls: test-dependencies | ||
@mkdir -p build/logs | ||
composer require --dev php-coveralls/php-coveralls | ||
@$(PHPUNIT) --coverage-clover build/logs/clover.xml | ||
php vendor/bin/php-coveralls -v | ||
|
||
doc: vendor | ||
@mkdir -p build/docs | ||
@apigen generate \ | ||
--source lib \ | ||
--destination build/docs/ \ | ||
--title "$(PACKAGE_NAME) $(PACKAGE_VERSION)" \ | ||
--template-theme "bootstrap" | ||
|
||
clean: | ||
@rm -fR build | ||
@rm -fR vendor | ||
@rm -f composer.lock | ||
|
||
.PHONY: all autoload doc clean test test-coverage test-coveralls update |
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