Skip to content

Commit 1a80ac5

Browse files
committed
add formatting check
1 parent b7dedc4 commit 1a80ac5

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

.github/workflows/format.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Check formatting
2+
3+
# ==== NOTE: do not rename this yml file or the run_number will be reset ====
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
format:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Use .NET Core SDK
14+
uses: actions/setup-dotnet@v4
15+
with:
16+
global-json-file: global.json
17+
source-url: https://nuget.pkg.github.com/Shane32/index.json
18+
env:
19+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
- name: Install dependencies
21+
run: dotnet restore
22+
- name: Check formatting
23+
run: |
24+
dotnet format --no-restore --verify-no-changes --severity error || (echo "Run 'dotnet format' to fix issues" && exit 1)

GraphQL.DI.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ EndProject
2424
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{7432A0AF-9346-41D7-9DA9-D7EFEAF1A401}"
2525
ProjectSection(SolutionItems) = preProject
2626
.github\workflows\build.yml = .github\workflows\build.yml
27+
.github\workflows\format.yml = .github\workflows\format.yml
2728
.github\workflows\publish.yml = .github\workflows\publish.yml
2829
.github\workflows\test.yml = .github\workflows\test.yml
2930
EndProjectSection

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"version": "9.0.100",
44
"rollForward": "latestMinor"
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)