Skip to content

Commit

Permalink
add formatting check
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Dec 11, 2024
1 parent b7dedc4 commit 1a80ac5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check formatting

# ==== NOTE: do not rename this yml file or the run_number will be reset ====

on:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use .NET Core SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
source-url: https://nuget.pkg.github.com/Shane32/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity error || (echo "Run 'dotnet format' to fix issues" && exit 1)
1 change: 1 addition & 0 deletions GraphQL.DI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{7432A0AF-9346-41D7-9DA9-D7EFEAF1A401}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
.github\workflows\format.yml = .github\workflows\format.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\test.yml = .github\workflows\test.yml
EndProjectSection
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"version": "9.0.100",
"rollForward": "latestMinor"
}
}
}

0 comments on commit 1a80ac5

Please sign in to comment.