Skip to content

Commit

Permalink
Add psalm tests to CI/CD and hooks
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Wolf <github@christianwolf.email>
  • Loading branch information
christianlupus committed May 29, 2023
1 parent f20abe6 commit 5a28a5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ jobs:
run: composer lint:lint
- name: Run PHP code style checker
shell: bash
env:
PHP_CS_FIXER_IGNORE_ENV: 1
run: composer cs:check

- name: Run PHP type checker Psalm
shell: bash
run: composer psalm

- name: Check for formatting issues with vue files (prettier)
shell: bash
run: >-
Expand Down
6 changes: 4 additions & 2 deletions .hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ trap cleanup EXIT
retVal=0

if [ -e 'vendor/bin/php-cs-fixer' ]; then

composer cs:check || { echo "The PHP code is not validly formatted."; (( retVal |= 1 )); }

fi

if [ -e 'vendor/bin/psalm.phar' ]; then
composer psalm || { echo "The PHP code has type issues. Check psalm."; (( retVal |= 16 )); }
fi

if [ -e 'node_modules/.bin/eslint' ]; then
Expand Down

0 comments on commit 5a28a5a

Please sign in to comment.