From d12788393152ac43dd390f4dcb71b2a1b3de18ae Mon Sep 17 00:00:00 2001 From: Thomas Boby Date: Thu, 24 Oct 2024 08:49:56 +0100 Subject: [PATCH] Fail pipeline on formatting fail --- .github/workflows/buildAndTest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildAndTest.yml b/.github/workflows/buildAndTest.yml index 3a9c110..8f9d0db 100644 --- a/.github/workflows/buildAndTest.yml +++ b/.github/workflows/buildAndTest.yml @@ -15,7 +15,10 @@ jobs: - name: Tool restore run: dotnet tool restore - name: Format Check - run: dotnet fantomas . --check || echo "The code was not formatted, run `dotnet fantomas .` to format all code." + run: dotnet fantomas . --check + - name: log format failure + if: failure() + run: echo "The code was not formatted, run `dotnet fantomas .` to format all code." - name: Restore run: dotnet restore - name: Run Build