Skip to content

Commit

Permalink
Added dotnet format step to build
Browse files Browse the repository at this point in the history
- Added default .editorconfig (dotnet new editorconfig)
- Applied dotnet format changes
- Added build step to verify no formatting changes are needed
  • Loading branch information
brianpursley committed Dec 19, 2024
1 parent bd63764 commit 5be3df4
Show file tree
Hide file tree
Showing 15 changed files with 479 additions and 103 deletions.
364 changes: 364 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=crlf
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ on:
- '*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+.*'
pull_request:
pull_request:
workflow_dispatch:

env:
VERSION: 0.0.0
ConnectionStrings__Test: ${{ secrets.TEST_CONNECTION_STRING }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }} # This checks out the commit that triggered the workflow run

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
Expand All @@ -39,6 +39,9 @@ jobs:
- name: Restore dependencies
run: dotnet restore

- name: Verify Format
run: dotnet format --verify-no-changes --verbosity diagnostic

- name: Build
run: dotnet build --no-restore --configuration Release /p:Version=${{ env.VERSION }} /p:CopyrightYear=$(date +%Y)

Expand Down Expand Up @@ -85,7 +88,7 @@ jobs:
with:
name: build-artifact
path: out

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion Npgmq.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ internal class MyMessageType
{
public string Foo { get; set; } = null!;
public int Bar { get; set; }
}
}
Loading

0 comments on commit 5be3df4

Please sign in to comment.