From 72d46b2ec2f8fa7ec5302a2eecbeb372c1a91252 Mon Sep 17 00:00:00 2001 From: Zhuojin Liu Date: Mon, 24 Feb 2025 16:16:35 -0800 Subject: [PATCH] Add .NET codestyle check --- .github/workflows/dotnet-codestyle.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/dotnet-codestyle.yml diff --git a/.github/workflows/dotnet-codestyle.yml b/.github/workflows/dotnet-codestyle.yml new file mode 100644 index 0000000..f81c19d --- /dev/null +++ b/.github/workflows/dotnet-codestyle.yml @@ -0,0 +1,34 @@ +name: .NET Codestyle + +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'recipes/llm-voice-assistant/dotnet/**/*.cs' + - '.github/workflows/dotnet-codestyle.yml' + pull_request: + branches: [ main, 'v[0-9]+.[0-9]+' ] + paths: + - 'recipes/llm-voice-assistant/dotnet/**/*.cs' + - '.github/workflows/dotnet-codestyle.yml' + +jobs: + check-dotnet-codestyle: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up .NET 8.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + + - name: Run Binding Codestyle + run: dotnet format --verify-no-changes + working-directory: binding/dotnet + + - name: Run Demo Codestyle + run: dotnet format --verify-no-changes + working-directory: demo/dotnet