diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3cfaeeb..9a7cce8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,23 +39,15 @@ jobs: run: composer update --optimize-autoloader --no-progress --ansi --no-interaction - name: Build run: ./bin/unipoints build + - name: Check built assets + if: startsWith(matrix.os, 'windows') == false + run: | + if ! git diff --exit-code --name-status; then + echo "::error file=$(git diff --name-status | head -n1)::PLEASE RUN bin/unipoints build" + exit 1 + fi - name: Check PHP coding style if: startsWith(matrix.os, 'ubuntu') && matrix.php-version == '8.2' run: composer run-script phpcs -- --ansi --no-interaction --dry-run --diff - name: PHPUnit run: composer run-script test -- --colors=always - - name: Check changes - id: check-changes - if: startsWith(matrix.os, 'ubuntu') && matrix.php-version == '8.2' && github.repository == 'mlocati/unipoints' && github.event_name == 'push' && github.ref == 'refs/heads/main' - run: | - if ! git diff --exit-code --name-status; then - echo "commit=yes" >>"$GITHUB_OUTPUT" - fi - - name: Push changes - if: steps.check-changes.outputs.commit == 'yes' - run: | - git config user.name 'Michele Locati' - git config user.email 'michele@locati.it' - git add --all - git commit -m 'Automatic update built assets' - git push