Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pwelter34 committed Oct 1, 2024
1 parent edb4dfd commit af1fa7d
Show file tree
Hide file tree
Showing 50 changed files with 3,397 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# EditorConfig: https://EditorConfig.org

root = true

# All Files
[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# XML Configuration Files
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct,refactorlog,runsettings}]
indent_size = 2

# JSON Files
[*.{json,json5,webmanifest}]
indent_size = 2

# Project Files
[*.{csproj,sqlproj}]
indent_size = 2

# YAML Files
[*.{yml,yaml}]
indent_size = 2

# Markdown Files
[*.md]
trim_trailing_whitespace = false

# Web Files
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,pcss,svg,vue}]
indent_size = 2

# Batch Files
[*.{cmd,bat}]
end_of_line = crlf

# Bash Files
[*.sh]
end_of_line = lf

[*.{cs,vb}]
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = true
dotnet_style_namespace_match_folder = true

[*.cs]
csharp_using_directive_placement = outside_namespace
csharp_style_namespace_declarations = file_scoped:warning
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
59 changes: 59 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "01:00"
timezone: "America/Chicago"
open-pull-requests-limit: 10

- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "02:00"
timezone: "America/Chicago"
open-pull-requests-limit: 10
ignore:
- dependency-name: "Microsoft.CodeAnalysis.CSharp"
groups:
Azure:
patterns:
- "Azure.*"
- "Microsoft.Azure.*"
- "Microsoft.Extensions.Azure"
AspNetCoreHealthChecks:
patterns:
- "AspNetCore.HealthChecks.*"
AspNetCore:
patterns:
- "Microsoft.AspNetCore.*"
- "Microsoft.Extensions.Features"
MicrosoftExtensions:
patterns:
- "Microsoft.Extensions.*"
EntityFrameworkCore:
patterns:
- "Microsoft.EntityFrameworkCore.*"
OpenTelemetry:
patterns:
- "OpenTelemetry.*"
Serilog:
patterns:
- "Serilog"
- "Serilog.*"
Hangfire:
patterns:
- "Hangfire"
- "Hangfire.*"
Testcontainers:
patterns:
- "Testcontainers.*"
xUnit:
patterns:
- "xunit"
- "xunit.assert"
- "xunit.core"
- "xunit.extensibility.*"
- "xunit.runner.*"
96 changes: 96 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Build

env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_ENVIRONMENT: github
ASPNETCORE_ENVIRONMENT: github
BUILD_PATH: "${{github.workspace}}/artifacts"
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

on:
push:
branches:
- main
- develop
tags:
- "v*"
pull_request:
branches:
- main
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore Dependencies
run: dotnet restore

- name: Build Solution
run: dotnet build --no-restore --configuration Release

- name: Run Test
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings

- name: Report Coverage
if: success()
uses: coverallsapp/github-action@v2
with:
file: "${{github.workspace}}/test/*/TestResults/*/coverage.info"
format: lcov

- name: Create Packages
if: success() && github.event_name != 'pull_request'
run: dotnet pack --configuration Release --no-build --output "${{env.BUILD_PATH}}"

- name: Upload Packages
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: packages
path: "${{env.BUILD_PATH}}"

deploy:
runs-on: ubuntu-latest
needs: build
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))

steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: packages

- name: Publish Packages GitHub
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://nuget.pkg.github.com/loresoft/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
done
- name: Publish Packages feedz
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://f.feedz.io/loresoft/open/nuget/index.json --api-key ${{ secrets.FEEDDZ_KEY }} --skip-duplicate
done
- name: Publish Packages Nuget
if: startsWith(github.ref, 'refs/tags/v')
run: |
for package in $(find -name "*.nupkg"); do
echo "${0##*/}": Pushing $package...
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
done
24 changes: 24 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependabot Auto-Merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'

steps:
- name: Dependabot Metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Dependabot Auto-Merge PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,10 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml

# Custom
/artifacts
*.GhostDoc.xml
coverage.xml
coverage.opencover.xml
*.received.txt
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# LinkBuilder.Generator
# RouteLink.Generators

Source generator to create a link builder from route attributes
51 changes: 51 additions & 0 deletions RouteLink.Generators.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RouteLink.Generators", "src\RouteLink.Generators\RouteLink.Generators.csproj", "{52D22058-9985-4AE3-8AEE-1E2A68A6AC20}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{89A8DB30-7715-4CE9-A057-925D97D21512}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
src\Directory.Build.props = src\Directory.Build.props
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74029119-636B-4364-998D-E9DFD2BB6DBF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RouteLink.Performance", "test\RouteLink.Performance\RouteLink.Performance.csproj", "{4ABB26B7-14C3-45BE-BE3D-153954745F15}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RouteLink.Generators.Tests", "test\RouteLink.Generators.Tests\RouteLink.Generators.Tests.csproj", "{F99226A9-1425-424D-95AF-611D9A631619}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{52D22058-9985-4AE3-8AEE-1E2A68A6AC20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{52D22058-9985-4AE3-8AEE-1E2A68A6AC20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52D22058-9985-4AE3-8AEE-1E2A68A6AC20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52D22058-9985-4AE3-8AEE-1E2A68A6AC20}.Release|Any CPU.Build.0 = Release|Any CPU
{4ABB26B7-14C3-45BE-BE3D-153954745F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4ABB26B7-14C3-45BE-BE3D-153954745F15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4ABB26B7-14C3-45BE-BE3D-153954745F15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4ABB26B7-14C3-45BE-BE3D-153954745F15}.Release|Any CPU.Build.0 = Release|Any CPU
{F99226A9-1425-424D-95AF-611D9A631619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F99226A9-1425-424D-95AF-611D9A631619}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F99226A9-1425-424D-95AF-611D9A631619}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F99226A9-1425-424D-95AF-611D9A631619}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{4ABB26B7-14C3-45BE-BE3D-153954745F15} = {74029119-636B-4364-998D-E9DFD2BB6DBF}
{F99226A9-1425-424D-95AF-611D9A631619} = {74029119-636B-4364-998D-E9DFD2BB6DBF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {46C45F3C-4058-426F-B1F9-4C8E368BE903}
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions coverlet.runsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>lcov</Format>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit af1fa7d

Please sign in to comment.