-
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.
- Loading branch information
Showing
84 changed files
with
13,616 additions
and
2 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,24 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 |
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,33 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
/.github export-ignore | ||
/build export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.phan.php export-ignore | ||
/.travis.yml export-ignore | ||
/composer.lock export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/Makefile export-ignore | ||
|
||
* text eol=lf | ||
|
||
# (binary is a macro for -text -diff) | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.ttf binary |
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,68 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
name: Demo | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
COLUMNS: 120 | ||
TERM_PROGRAM: Hyper | ||
|
||
jobs: | ||
pure-php: | ||
name: Pure PHP | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
tools: composer | ||
|
||
- name: Build the Project | ||
run: make update | ||
|
||
- name: Validate CSV (default is table) | ||
run: make demo-github | ||
continue-on-error: true | ||
|
||
- name: Validate CSV (text) | ||
run: OUTPUT=text make demo-github | ||
continue-on-error: true | ||
|
||
- name: Validate CSV (github) | ||
run: OUTPUT=github make demo-github | ||
continue-on-error: true | ||
|
||
- name: Validate CSV (gitlab) | ||
run: OUTPUT=gitlab make demo-github | ||
continue-on-error: true | ||
|
||
- name: Validate CSV (teamcity) | ||
run: OUTPUT=teamcity make demo-github | ||
continue-on-error: true | ||
|
||
- name: Validate CSV (junit) | ||
run: OUTPUT=junit make demo-github | ||
continue-on-error: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- 'master' | ||
schedule: | ||
- cron: '12 */8 * * *' | ||
|
||
env: | ||
COLUMNS: 120 | ||
TERM_PROGRAM: Hyper | ||
|
||
jobs: | ||
phpunit: | ||
name: PHPUnit | ||
runs-on: ubuntu-latest | ||
env: | ||
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }} | ||
strategy: | ||
matrix: | ||
php-version: [ 8.1, 8.2, 8.3 ] | ||
coverage: [ xdebug, none ] | ||
composer_flags: [ "--prefer-lowest", "" ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: ${{ matrix.coverage }} | ||
tools: composer | ||
extensions: ast | ||
|
||
- name: Build the Project | ||
run: make update --no-print-directory | ||
|
||
- name: 🧪 PHPUnit Tests | ||
run: make test --no-print-directory | ||
|
||
- name: Uploading coverage to coveralls | ||
if: ${{ matrix.coverage == 'xdebug' }} | ||
continue-on-error: true | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: make report-coveralls --no-print-directory || true | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
continue-on-error: true | ||
with: | ||
name: PHPUnit - ${{ matrix.php-version }} - ${{ matrix.coverage }} | ||
path: build/ | ||
|
||
|
||
linters: | ||
name: Linters | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: [ 8.1, 8.2, 8.3 ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: none | ||
tools: composer | ||
extensions: ast | ||
|
||
- name: Build the Project | ||
run: make update --no-print-directory | ||
|
||
- name: 👍 Code Quality | ||
run: make codestyle --no-print-directory | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
continue-on-error: true | ||
with: | ||
name: Linters - ${{ matrix.php-version }} | ||
path: build/ | ||
|
||
|
||
report: | ||
name: Reports | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-version: [ 8.1, 8.2, 8.3 ] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
coverage: xdebug | ||
tools: composer | ||
extensions: ast | ||
|
||
- name: Build the Project | ||
run: make update --no-print-directory | ||
|
||
- name: 📝 Build Reports | ||
run: make report-all --no-print-directory | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
continue-on-error: true | ||
with: | ||
name: Reports - ${{ matrix.php-version }} | ||
path: build/ |
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 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
.idea | ||
.DS_Store | ||
build | ||
vendor | ||
phpunit.xml | ||
*.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,34 @@ | ||
<?php | ||
|
||
/** | ||
* JBZoo Toolbox - Csv-Blueprint. | ||
* | ||
* This file is part of the JBZoo Toolbox project. | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @license MIT | ||
* @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
* @see https://github.com/JBZoo/Csv-Blueprint | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
$default = include __DIR__ . '/vendor/jbzoo/codestyle/src/phan.php'; | ||
|
||
// Remove SimplifyExpressionPlugin from plugin list | ||
$default['plugins'] = \array_diff($default['plugins'], ['SimplifyExpressionPlugin']); | ||
|
||
return \array_merge($default, [ | ||
'directory_list' => [ | ||
'src', | ||
|
||
'vendor/jbzoo/data/src', | ||
'vendor/jbzoo/cli/src', | ||
'vendor/jbzoo/utils/src', | ||
'vendor/jbzoo/ci-report-converter/src', | ||
'vendor/league/csv/src', | ||
'vendor/fakerphp/faker/src', | ||
'vendor/symfony/console', | ||
], | ||
]); |
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,55 @@ | ||
# | ||
# JBZoo Toolbox - Csv-Blueprint. | ||
# | ||
# This file is part of the JBZoo Toolbox project. | ||
# For the full copyright and license information, please view the LICENSE | ||
# file that was distributed with this source code. | ||
# | ||
# @license MIT | ||
# @copyright Copyright (C) JBZoo.com, All rights reserved. | ||
# @see https://github.com/JBZoo/Csv-Blueprint | ||
# | ||
|
||
|
||
ifneq (, $(wildcard ./vendor/jbzoo/codestyle/src/init.Makefile)) | ||
include ./vendor/jbzoo/codestyle/src/init.Makefile | ||
endif | ||
|
||
OUTPUT ?= table | ||
|
||
update: ##@Project Install/Update all 3rd party dependencies | ||
$(call title,"Install/Update all 3rd party dependencies") | ||
@echo "Composer flags: $(JBZOO_COMPOSER_UPDATE_FLAGS)" | ||
@composer update $(JBZOO_COMPOSER_UPDATE_FLAGS) | ||
|
||
|
||
test-all: ##@Project Run all project tests at once | ||
@make test | ||
@make codestyle | ||
|
||
|
||
demo-valid: ##@Project Run demo valid CSV | ||
$(call title,"Demo - Valid CSV") | ||
@${PHP_BIN} ./csv-blueprint validate:csv \ | ||
--csv=./tests/fixtures/demo.csv \ | ||
--schema=./tests/schemas/demo_valid.yml | ||
|
||
|
||
demo-invalid: ##@Project Run demo invalid CSV | ||
$(call title,"Demo - Invalid CSV") | ||
@${PHP_BIN} ./csv-blueprint validate:csv \ | ||
--csv=./tests/fixtures/demo.csv \ | ||
--schema=./tests/schemas/demo_invalid.yml | ||
|
||
|
||
demo-github: ##@Project Run demo invalid CSV | ||
@${PHP_BIN} ./csv-blueprint validate:csv \ | ||
--csv=./tests/fixtures/demo.csv \ | ||
--schema=./tests/schemas/demo_invalid.yml \ | ||
--output=$(OUTPUT) \ | ||
--ansi | ||
|
||
|
||
demo: ##@Project Run all demo commands | ||
@make demo-valid | ||
@make demo-invalid |
Oops, something went wrong.