From 59a6efc63f8be1f75d6079cb0bc806476264d55b Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Mon, 13 Jan 2025 22:43:40 +0100 Subject: [PATCH] [CI] Fix and display changed dist files in the CI --- .github/workflows/test.yaml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 24dd1d62c4..bf00b5b3fe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,21 +47,17 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: yarn --immutable && yarn build - - name: Check if js dist files are current - id: changes - run: | - echo "STATUS=$(git status --porcelain)" >> $GITHUB_OUTPUT - - name: No changes found - if: steps.changes.outputs.STATUS == '' - run: | - echo "git status is clean" - - name: Changes were found - if: steps.changes.outputs.STATUS != '' + - name: Check if JS dist files are current run: | - echo "JS dist files need to be rebuilt" - echo "${{ steps.changes.outputs.STATUS }}" - exit 1 + if [[ -n $(git status --porcelain) ]]; then + echo "The Git workspace is unclean! Changes detected:" + git status --porcelain + git diff + exit 1 + else + echo "The Git workspace is clean. No changes detected." + fi tests-php-components: runs-on: ubuntu-latest