forked from predis/predis
-
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.
* Add complete CI * Fix CI * Fix spelling * Fix indentation * Fix CI * Fix CI * Revert disabling unit tests * Add coverage driver to CI * Start coverage debugging * Fix debugging ignored, and an empty message aborts the commit. * Stop debugging * Move TODO-s from source to GitHub issues * Ignore too long lines in certain files * Revert requiring php-parallel-lint/php-parallel-lint * formatting * try shorter formatting * formatting * fix syntax * try two paths? * Update .editorconfig Co-authored-by: Viktor Szépe <[email protected]> * indentation * make it a group Co-authored-by: Till Krüss <[email protected]>
- Loading branch information
1 parent
6e45ca5
commit ac259bd
Showing
43 changed files
with
372 additions
and
237 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,6 @@ | ||
[codespell] | ||
skip=./.git | ||
check-hidden= | ||
check-filenames= | ||
builtin=clear,rare,informal,usage,code,names | ||
ignore-words-list=master,masters,slave,slaves,whitelist,cas,exat,smove |
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,9 +1,16 @@ | ||
* text=auto | ||
|
||
/tests export-ignore | ||
/.github export-ignore | ||
/.github/ export-ignore | ||
/examples/ export-ignore | ||
/tests/ export-ignore | ||
/.codespellrc export-ignore linguist-language=INI | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.php_cs.dist export-ignore | ||
/.php-cs-fixer.dist.php export-ignore | ||
/CHANGELOG.md export-ignore linguist-documentation | ||
/CONTRIBUTING.md export-ignore linguist-documentation | ||
/FAQ.md export-ignore linguist-documentation | ||
/VERSION export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/phpstan.dist.neon 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
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,164 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | ||
|
||
name: Linters | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- v2.** | ||
pull_request: null | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
byte_level: | ||
name: Byte-level | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check file permissions | ||
run: test "$(find . -type f -not -path './.git/*' -executable)" = "./bin/create-command-test" | ||
|
||
- name: "Find non-printable ASCII characters" | ||
run: | | ||
! LC_ALL=C.UTF-8 find . -type f -name '*.php' -print0 \ | ||
| xargs --null -- grep --perl-regexp --with-filename --line-number '[^ -~ü]' | ||
syntax_errors: | ||
name: Syntax errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.1" | ||
coverage: none | ||
tools: parallel-lint | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check source code for syntax errors | ||
run: composer exec -- parallel-lint bin/ examples/ src/ tests/ | ||
|
||
static_analysis: | ||
name: Static Analysis | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.2" | ||
coverage: none | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate Composer configuration | ||
run: composer validate --no-interaction --strict | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
|
||
- name: Check PSR-4 mapping | ||
run: composer dump-autoload --no-interaction --optimize --strict-psr | ||
|
||
- name: Perform static analysis | ||
run: composer run phpstan | ||
|
||
coding_standards: | ||
name: Coding Standards | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "8.1" | ||
coverage: none | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check EditorConfig configuration | ||
run: test -f .editorconfig | ||
|
||
- name: Check adherence to EditorConfig | ||
uses: greut/eclint-action@v0 | ||
|
||
- name: Install dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: highest | ||
|
||
- name: Check coding style | ||
run: composer exec -- php-cs-fixer fix --diff --dry-run --allow-risky=yes --using-cache=no | ||
|
||
- name: Search for TODO-s and FIXME-s | ||
run: | | ||
! git grep --extended-regexp --ignore-case '\b(TODO|FIXME)\b' -- ':/' ':!tests/*' ':!*/linters\.yml' | ||
exported_files: | ||
name: Exported files | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check exported files | ||
run: | | ||
EXPECTED="LICENSE,README.md,autoload.php,composer.json" | ||
CURRENT="$( | ||
git archive HEAD \ | ||
| tar --list --exclude="src" --exclude="src/*" --exclude="bin" --exclude="bin/*" \ | ||
| paste --serial --delimiters="," | ||
)" | ||
echo "CURRENT =${CURRENT}" | ||
echo "EXPECTED=${EXPECTED}" | ||
test "${CURRENT}" = "${EXPECTED}" | ||
spelling: | ||
name: Spelling | ||
needs: | ||
- byte_level | ||
- syntax_errors | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-codespell | ||
|
||
- name: Install codespell | ||
run: pip install --user 'codespell>=2.2' | ||
|
||
- name: Search for misspellings | ||
run: $(python -m site --user-base)/bin/codespell |
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.