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 98704e0
Show file tree
Hide file tree
Showing 13 changed files with 482 additions and 102 deletions.
363 changes: 363 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

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
3 changes: 3 additions & 0 deletions Npgmq.Example/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System.Reflection;

using Microsoft.Extensions.Configuration;

using Npgmq;

using Npgsql;

var configuration = new ConfigurationBuilder()
Expand Down
Loading

0 comments on commit 98704e0

Please sign in to comment.