From 75ff5c2f7e14da6ab6b8d3bc2f2d26f2d1ce14c4 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Mon, 3 Feb 2025 23:48:02 +0200 Subject: [PATCH] Improve the `format` workflow job --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7149488..1074438e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,11 +33,24 @@ jobs: with: dotnet-version: 9.0.x + # Build the project separately to discern between build and format errors + - name: Build + run: > + dotnet build + -p:CSharpier_Bypass=true + --configuration Release + - name: Verify formatting + id: verify run: > dotnet build -t:CSharpierFormat --configuration Release + --no-restore + + - name: Report issues + if: ${{ failure() && steps.verify.outcome == 'failure' }} + run: echo "::error title=Bad formatting::Formatting issues detected. Please build the solution locally to fix them." test: # Tests need access to secrets, so we can't run them against PRs because of limited trust