Skip to content

Commit

Permalink
build: add restore step to format
Browse files Browse the repository at this point in the history
  • Loading branch information
ErtanTaner committed Aug 7, 2023
1 parent f9c34e3 commit e743b42
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
dotnet-version: '7.0.x'
- name: Install .NET 7 SDK
uses: actions/[email protected]
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

0 comments on commit e743b42

Please sign in to comment.