-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42e7cd2
commit 30364c7
Showing
7 changed files
with
254 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,60 +34,19 @@ jobs: | |
|
||
- name: Restore Packages | ||
run: dotnet restore "${{ env.solution-path }}" | ||
|
||
- name: Build | ||
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }} | ||
|
||
code-quality: | ||
if: github.actor != 'dependabot[bot]' | ||
runs-on: windows-latest | ||
name: Analyze Code Quality | ||
env: | ||
solution-path: './src/NetCore Utilities Email.sln' | ||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: zulu | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Cache SonarCloud packages | ||
uses: actions/[email protected] | ||
with: | ||
path: ~\sonar\cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Cache SonarCloud scanner | ||
id: cache-sonar-scanner | ||
uses: actions/[email protected] | ||
with: | ||
path: .\.sonar\scanner | ||
key: ${{ runner.os }}-sonar-scanner | ||
restore-keys: ${{ runner.os }}-sonar-scanner | ||
- name: Install SonarCloud scanner | ||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' | ||
shell: powershell | ||
run: | | ||
New-Item -Path .\.sonar\scanner -ItemType Directory | ||
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner | ||
- name: Install GitVersion | ||
run: dotnet tool install --global GitVersion.Tool | ||
|
||
- name: Determine Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
- name: Test | ||
run: dotnet test "${{ env.solution-path }}" --no-build --configuration Release --collect "XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --logger "trx;LogFileName=unittests.trx" | ||
|
||
- name: Build and analyze | ||
- name: Push Coverage to Codacy | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
shell: powershell | ||
CODACY_ORGANIZATION_PROVIDER: ${{ secrets.CODACY_ORGANIZATION_PROVIDER }} | ||
CODACY_USERNAME: ${{ secrets.CODACY_USERNAME }} | ||
CODACY_PROJECT_NAME: ${{ secrets.CODACY_PROJECT_NAME }} | ||
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }} | ||
run: | | ||
.\.sonar\scanner\dotnet-sonarscanner begin /k:"IowaComputerGurus_netcore.utilities.email" /o:"iowacomputergurus-github" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet restore "${{ env.solution-path }}" | ||
dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }} | ||
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | ||
bash <(curl -Ls https://coverage.codacy.com/get.sh) report $(find . -name '*.opencover.xml' -printf '-r %p ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,61 +5,7 @@ on: | |
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: windows-latest | ||
name: Analyze Code Quality | ||
env: | ||
solution-path: './src/NetCore Utilities Email.sln' | ||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: zulu | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Cache SonarCloud packages | ||
uses: actions/[email protected] | ||
with: | ||
path: ~\sonar\cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Cache SonarCloud scanner | ||
id: cache-sonar-scanner | ||
uses: actions/[email protected] | ||
with: | ||
path: .\.sonar\scanner | ||
key: ${{ runner.os }}-sonar-scanner | ||
restore-keys: ${{ runner.os }}-sonar-scanner | ||
- name: Install SonarCloud scanner | ||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' | ||
shell: powershell | ||
run: | | ||
New-Item -Path .\.sonar\scanner -ItemType Directory | ||
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner | ||
- name: Install GitVersion | ||
run: dotnet tool install --global GitVersion.Tool | ||
|
||
- name: Determine Version | ||
id: gitversion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
useConfigFile: true | ||
|
||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
shell: powershell | ||
run: | | ||
.\.sonar\scanner\dotnet-sonarscanner begin /k:"IowaComputerGurus_netcore.utilities.email" /o:"iowacomputergurus-github" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet restore "${{ env.solution-path }}" | ||
dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }} | ||
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build & Publish to NuGet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
mode: ContinuousDeployment | ||
next-version: 5.1.4 | ||
next-version: 7.0.0 | ||
branches: | ||
develop: | ||
regex: develop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace ICG.NetCore.Utilities.Email | ||
namespace ICG.NetCore.Utilities.Email; | ||
|
||
/// <summary> | ||
/// Setting object for email templates | ||
/// </summary> | ||
public class EmailTemplateSettings | ||
{ | ||
public class EmailTemplateSettings | ||
{ | ||
public string DefaultTemplatePath { get; set; } | ||
public Dictionary<string, string> AdditionalTemplates { get; set; } | ||
} | ||
/// <summary> | ||
/// The application relative file path to the default template file | ||
/// </summary> | ||
public string DefaultTemplatePath { get; set; } | ||
|
||
/// <summary> | ||
/// A collection of additional templates with a "name" and "path" for each one | ||
/// </summary> | ||
public Dictionary<string, string> AdditionalTemplates { get; set; } | ||
} |
Oops, something went wrong.