From e743b42c3cae279a829b07a0ab6f783078275d5b Mon Sep 17 00:00:00 2001 From: Ertan Taner Date: Thu, 3 Aug 2023 20:13:55 +0300 Subject: [PATCH] build: add restore step to format --- .github/workflows/dotnet-format.yml | 43 +++++++++++++++++++---------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml index 820ca4e28e..645f1f6153 100644 --- a/.github/workflows/dotnet-format.yml +++ b/.github/workflows/dotnet-format.yml @@ -2,28 +2,43 @@ name: dotnet format on: push: - branches: [ 'main*', 'instrumentation*', 'exporter*', 'extensions*' ] + branches: + [ + 'main*', + 'instrumentation*', + 'exporter*', + 'extensions*' + ] paths: - - '**.cs' - - '.editorconfig' + - '**.cs' + - '.editorconfig' pull_request: - branches: [ 'main*', 'instrumentation*', 'exporter*', 'extensions*' ] + branches: + [ + 'main*', + 'instrumentation*', + 'exporter*', + 'extensions*' + ] paths: - - '**.cs' - - '.editorconfig' + - '**.cs' + - '.editorconfig' jobs: check-format: runs-on: windows-latest steps: - - name: check out code - uses: actions/checkout@v3 + - name: check out code + uses: actions/checkout@v3 - - name: Install .NET 7 SDK - uses: actions/setup-dotnet@v3.2.0 - with: - dotnet-version: '7.0.x' + - name: Install .NET 7 SDK + uses: actions/setup-dotnet@v3.2.0 + with: + dotnet-version: '7.0.x' - - name: dotnet format - run: dotnet format .\opentelemetry-dotnet-contrib.sln --no-restore --verify-no-changes + - name: dotnet restore + run: dotnet restore + + - name: dotnet format + run: dotnet format .\opentelemetry-dotnet-contrib.sln --no-restore --verify-no-changes