Skip to content

Commit

Permalink
Add composer validate and normalize checks
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Aug 7, 2024
1 parent 1f77105 commit 80f84bd
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/static-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,37 @@ jobs:
${{ github.workflow }}-PHP_${{ matrix.php-version }}-
- name: Install dependencies
run: composer update --ansi
run: |
composer update --ansi
- name: Check - Composer validate
run: |
COMPONENTS=$(
find src/Nexus -mindepth 2 -type f -name composer.json \
| cut -d '/' -f 1-3 \
| sort -fh
)
echo "+ composer validate --strict --ansi"
composer validate --strict --ansi
echo "$COMPONENTS" | xargs -I {} bash -xc "composer validate --strict --ansi --working-dir {}"
- name: Check - Composer normalize
run: |
COMPONENTS=$(
find src/Nexus -mindepth 2 -type f -name composer.json \
| cut -d '/' -f 1-3 \
| sort -fh
)
echo "::group::composer normalize"
composer global config --ansi allow-plugins.ergebnis/composer-normalize true
composer global require --ansi ergebnis/composer-normalize
echo "::endgroup::"
echo "+ composer normalize --dry-run --diff --ansi"
composer normalize --dry-run --diff --ansi
echo "$COMPONENTS" | xargs -I {} bash -xc "composer normalize --dry-run --diff --ansi --working-dir {}"
- name: Check - file permissions
run: bin/check-file-permissions
Expand Down

0 comments on commit 80f84bd

Please sign in to comment.