Skip to content

Commit c6bc84c

Browse files
committed
Scale back the formatting workflow
1 parent 7ef9d94 commit c6bc84c

File tree

2 files changed

+36
-116
lines changed

2 files changed

+36
-116
lines changed

.github/workflows/format.yml

Lines changed: 0 additions & 116 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,41 @@ env:
1717
DOTNET_CLI_TELEMETRY_OPTOUT: true
1818

1919
jobs:
20+
format:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 10
23+
24+
permissions:
25+
contents: read
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
- name: Install .NET
32+
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
33+
with:
34+
dotnet-version: 9.0.x
35+
36+
# Build the project separately to discern between build and format errors
37+
- name: Build
38+
run: >
39+
dotnet build
40+
-p:CSharpier_Bypass=true
41+
--configuration Release
42+
43+
- name: Verify formatting
44+
id: verify
45+
run: >
46+
dotnet build
47+
-t:CSharpierFormat
48+
--configuration Release
49+
--no-restore
50+
51+
- name: Report issues
52+
if: ${{ failure() && steps.verify.outcome == 'failure' }}
53+
run: echo "::error title=Bad formatting::Formatting issues detected. Please build the solution locally to fix them."
54+
2055
test:
2156
runs-on: ubuntu-latest
2257
timeout-minutes: 10
@@ -111,6 +146,7 @@ jobs:
111146
if: ${{ github.ref_type == 'tag' }}
112147

113148
needs:
149+
- format
114150
- test
115151
- pack
116152

0 commit comments

Comments
 (0)