From 6f5e6e07d5dae3dc73c44e18da7bea86b6b440e9 Mon Sep 17 00:00:00 2001 From: Valters Melnalksnis Date: Mon, 29 Aug 2022 20:15:33 +0300 Subject: [PATCH] fix(build): Treat build warnings as errors --- .github/workflows/test.yml | 10 +++++++++- deployment/publish.sh | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1da1e3a..3a912c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,13 @@ jobs: - run: dotnet restore - name: Build - run: dotnet build --configuration Release --no-restore /nologo /clp:NoSummary + run: > + dotnet build + --configuration Release + --no-restore + /warnAsError + /nologo + /clp:NoSummary - name: Run Tests run: > @@ -45,6 +51,8 @@ jobs: uses: VMelnalksnis/resharper-inspect-action@v0.2.3 with: solution: PaperlessDotNet.sln + resharper-version: 2022.1.2 + treat-warnings-as-errors: true - name: Gather Code Coverage if: github.event.schedule == null diff --git a/deployment/publish.sh b/deployment/publish.sh index ef64d41..0c9937e 100755 --- a/deployment/publish.sh +++ b/deployment/publish.sh @@ -12,6 +12,7 @@ dotnet pack \ -p:AssemblyFileVersion="$full_version" \ -p:PackageVersion="$version" \ -p:InformationalVersion="$version""$3" \ + /warnAsError \ /nologo || exit