diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e4a474051..b617eec063 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,21 @@ jobs: run: cloc --include-lang C#,SQL,Razor,"Bourne Shell",PowerShell,HTML,CSS,Sass,JavaScript,TypeScript --vcs git + lint: + name: Lint + runs-on: ubuntu-20.04 + steps: + - name: Checkout repo + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 + + # TODO: This can be removed when upgrading to .NET 6 + - name: Restore tools + run: dotnet tool restore + + - name: Verify Format + run: dotnet tool run dotnet-format --check + + testing: name: Testing runs-on: windows-2019 @@ -73,10 +88,6 @@ jobs: run: dotnet tool restore shell: pwsh - - name: Verify Format - run: dotnet tool run dotnet-format --check - shell: pwsh - - name: Test OSS solution run: dotnet test ./test --configuration Debug --no-build shell: pwsh @@ -446,6 +457,7 @@ jobs: runs-on: ubuntu-20.04 needs: - cloc + - lint - testing - build-artifacts - build-docker @@ -458,6 +470,7 @@ jobs: || github.ref == 'refs/heads/hotfix-rc' env: CLOC_STATUS: ${{ needs.cloc.result }} + LINT_STATUS: ${{ needs.lint.result }} TESTING_STATUS: ${{ needs.testing.result }} BUILD_ARTIFACTS_STATUS: ${{ needs.build-artifacts.result }} BUILD_DOCKER_STATUS: ${{ needs.build-docker.result }} @@ -465,6 +478,8 @@ jobs: run: | if [ "$CLOC_STATUS" = "failure" ]; then exit 1 + elif [ "$LINT_STATUS" = "failure" ]; then + exit 1 elif [ "$TESTING_STATUS" = "failure" ]; then exit 1 elif [ "$BUILD_ARTIFACTS_STATUS" = "failure" ]; then