diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml index 8b43819..3be712c 100644 --- a/.github/workflows/static-code-analysis.yml +++ b/.github/workflows/static-code-analysis.yml @@ -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\n" + 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\n" + composer global config --ansi allow-plugins.ergebnis/composer-normalize true + composer global require --ansi ergebnis/composer-normalize + echo "::endgroup::\n" + + echo "+ composer normalize --dry-run --diff --ansi\n" + 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