Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ jobs:
enable-frontend: true
enable-eslint: true
enable-phpunit: true
# Run the 61 Hydra mechanical gates against this PR's diff.
#
# Without this, wiring the gates into `composer check:strict` would have
# been a LOCAL-ONLY change: nothing in this repository's CI runs
# check:strict — there is no workflow that invokes it — so every PR would
# have gone green with the gates never having executed. A gate that only
# runs on a developer's machine is not a gate.
#
# Pinned to a tag rather than `main` so a change to the gates cannot alter
# this repo's verdict without a commit in this repo to move the pin.
enable-hydra-gates: true
hydra-gates-ref: v1.0.1
# Newman stays disabled while the openbuild#33 fixes are in flight.
# The collection bugs in this PR are fixed (uuid `@self.id` extraction,
# `export-job` slug correction, hello-world `@self.slug` fallback). But
Expand Down
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@
"OCA\\OpenRegister\\": "tests/Stubs/"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ConductionNL/.github.git",
"no-api": true
}
],
"require": {
"php": "^8.3"
},
"require-dev": {
"conduction/hydra-gates": "^1.0",
"cyclonedx/cyclonedx-php-composer": "^6.2",
"edgedesign/phpqa": "^1.27",
"nextcloud/coding-standard": "^1.4",
Expand Down Expand Up @@ -55,7 +63,9 @@
"test:all": "if [ -f vendor/bin/phpunit ]; then ./vendor/bin/phpunit --colors=always --no-coverage; else echo 'phpunit not installed, skipping...'; fi",
"check": "E=0; for CMD in lint phpcs psalm test:unit; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:full": "E=0; for CMD in lint phpcs psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"check:strict": "E=0; for CMD in lint phpcs phpmd psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E",
"gates": "hydra-gates --app-dir .",
"gates:full": "hydra-gates --app-dir . --full",
"check:strict": "E=0; G=0; for CMD in lint phpcs phpmd psalm phpstan test:all gates; do echo; echo \"=== $CMD ===\"; composer $CMD; R=$?; if [ $R -ne 0 ]; then E=1; if [ \"$CMD\" = gates ]; then G=$R; fi; fi; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED — read the gate COVERAGE block above before treating this as complete.\"; else echo \"SOME CHECKS FAILED (see above)\"; if [ $G -eq 99 ]; then echo \" gates: COULD NOT RUN (exit 99) — a configuration error, NOT a clean run. Nothing was gated.\"; elif [ $G -ne 0 ]; then echo \" gates: $G gate(s) failed — run 'composer gates' directly; its exit code is the failure COUNT.\"; fi; fi; exit $E",
"fix": [
"@cs:fix"
],
Expand Down
62 changes: 61 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading