diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 94666ea2..2f666301 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -2,24 +2,41 @@ name: CI on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + + - name: Restore dependencies + run: dotnet restore + + # Format the output of dotnet format + - name: Add dotnet-format problem matcher + uses: xt0rted/dotnet-format-problem-matcher@v1 + + # Install dotnet format as a global tool + - name: Install dotnet format + run: dotnet tool update --global dotnet-format + + # Run dotnet format --dry-run --check + # By default, the task ensure the exit code is 0 + # If a file needs to be edited by dotnet format, the exit code will be a non-zero value + # So the task will fail + - name: Run dotnet format + run: dotnet format --check --verbosity diagnostic + + - name: Build + run: dotnet build --no-restore + + - name: Test + run: dotnet test --no-build --verbosity normal diff --git a/Src/Notion.Client/Extensions/EnumExtensions.cs b/Src/Notion.Client/Extensions/EnumExtensions.cs index f7feea08..987104b8 100644 --- a/Src/Notion.Client/Extensions/EnumExtensions.cs +++ b/Src/Notion.Client/Extensions/EnumExtensions.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using System.Runtime.Serialization; namespace Notion.Client.Extensions @@ -19,4 +19,4 @@ public static string GetEnumMemberValue(this T enumValue) where T : System.En return null; } } -} \ No newline at end of file +}