From c78a9a63fe7b398173643516517d4ecc1a31ccaf Mon Sep 17 00:00:00 2001 From: firewave Date: Mon, 2 Dec 2024 09:49:59 +0100 Subject: [PATCH] CI-windows.yml: fail `build` step if changed and unversioned files exist afterwards --- .github/workflows/CI-windows.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml index c5916231a2e..13eb3702be8 100644 --- a/.github/workflows/CI-windows.yml +++ b/.github/workflows/CI-windows.yml @@ -244,3 +244,15 @@ jobs: cd test\cfg cl.exe windows.cpp -DUNICODE=1 -D_UNICODE=1 /Zs || exit /b !errorlevel! cl.exe mfc.cpp /EHsc /Zs || exit /b !errorlevel! + + - name: Show all ignored files + if: false # TODO: currently lists all the contents of ignored folders - we only need what actually matched + run: | + git ls-files --others --ignored --exclude-standard || exit /b !errorlevel! + + - name: Check for changed and unversioned files + run: | + :: TODO: how to do this with a single command? + git status --ignored=no + :: TODO: make this work + :: git status --ignored=no | grep -q 'working tree clean'