Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0b4ea1c
Implemented Bridge pattern
viveksacademia4git Feb 2, 2024
910c137
Bridge pattern documentation
viveksacademia4git Feb 3, 2024
e5a8bd4
Bridge pattern examples and docs
viveksacademia4git Feb 3, 2024
81e7a62
Class and interface docs
viveksacademia4git Feb 3, 2024
cd1d517
Completed Bridge pattern
viveksacademia4git Feb 4, 2024
07ab168
Create release.yml
viveksacademia4git Feb 5, 2024
08ff911
Update release.yml
viveksacademia4git Feb 5, 2024
f0b190b
Update pipelines
viveksacademia4git Feb 5, 2024
9dd3cf8
Pipeline correction
viveksacademia4git Feb 5, 2024
27dca2e
Pipeline - removed MSBuild
viveksacademia4git Feb 5, 2024
e952fbf
Pipeline - removed Restore app
viveksacademia4git Feb 5, 2024
08e2481
Update deploy pipeline
viveksacademia4git Feb 5, 2024
cd4d56e
Pipeline - deploy after build
viveksacademia4git Feb 5, 2024
98f0155
Refactor pipelines
viveksacademia4git Feb 5, 2024
ae904d4
Update PR pipeline name
viveksacademia4git Feb 5, 2024
a386d41
Test push branch
viveksacademia4git Feb 5, 2024
7c67ede
Update PR and Release pipelines
viveksacademia4git Feb 5, 2024
82fa634
Merge pull request #66 from vivopensource/65-configure-cd
viveksacademia4git Feb 5, 2024
cbf5985
Merge branch 'dev' into 64-add-bridge-pattern
viveksacademia4git Feb 5, 2024
3ed942b
Update version and merge dev
viveksacademia4git Feb 5, 2024
929edd0
Merge pull request #67 from vivopensource/64-add-bridge-pattern
viveksacademia4git Feb 5, 2024
4d89238
Update test.yml for coverage
viveksacademia4git Feb 5, 2024
3c02ec8
Update test.yml
viveksacademia4git Feb 5, 2024
c94d40b
Write code coverage summary on actions
viveksacademia4git Feb 5, 2024
8c83a2d
Pipeline with Code coverage summary
viveksacademia4git Feb 5, 2024
ed2c9a1
Update README.md
viveksacademia4git Feb 5, 2024
8144420
Correct code coverage in pipelines
viveksacademia4git Feb 5, 2024
f7ffbf0
Update PR pipeline code coverage
viveksacademia4git Feb 5, 2024
4b16a11
Correct PR pipeline
viveksacademia4git Feb 5, 2024
1ba54e9
Update pipelines
viveksacademia4git Feb 5, 2024
1664578
Test release pipeline
viveksacademia4git Feb 5, 2024
85d28ad
Correct pipelines
viveksacademia4git Feb 5, 2024
71ee086
Correct pipeline
viveksacademia4git Feb 5, 2024
bb80aa1
Merge test and PR pipelines
viveksacademia4git Feb 5, 2024
24ec8c5
Update pipelines
viveksacademia4git Feb 5, 2024
0cdcd20
Merge pull request #69 from vivopensource/68-add-coverage-info-on-repo
viveksacademia4git Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions .github/workflows/dotnet-desktop.yml

This file was deleted.

95 changes: 95 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

name: Pull Request

on:
pull_request:
branches:
- 'dev'

jobs:

test-linux:

runs-on: ubuntu-latest

env:
Solution_Name: GofPatterns.sln
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj

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

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Debug --no-restore

- name: Test
run: dotnet test --configuration Debug --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage

- name: Code Coverage Result MD
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '80 90'

- name: Code Coverage Result MD
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md

- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

test-windows:

runs-on: windows-latest

env:
Solution_Name: GofPatterns.sln
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj

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

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.0.2

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build

- name: Test
run: dotnet test

- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: Debug
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

name: Release

on:
push:
branches:
- 'main'

jobs:

release:

runs-on: ubuntu-latest

env:
Solution_Name: GofPatterns.sln
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build -c Release --no-restore

- name: Test
run: dotnet test -c Release --no-restore --no-build --verbosity normal --filter "Category!=LongRunning" --collect:"XPlat Code Coverage" --results-directory ./coverage

- name: Code Coverage Report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '80 90'

- name: Code Coverage Result MD
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md

- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

- name: Pack
run: dotnet pack GofPatterns/GofPatterns.csproj -c Release --no-restore --no-build --include-symbols -p:SymbolPackageFormat=snupkg -o .

# Push to NuGet
- name: Deploy
run: dotnet nuget push *.nupkg --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

name: Test

on:
push:
branches:
- '**'
- '!main'
- '!dev'

jobs:

test:

runs-on: ubuntu-latest

env:
Solution_Name: GofPatterns.sln
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj

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

- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Debug --no-restore

- name: Test
run: dotnet test --configuration Debug --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage

- name: Code Coverage Result MD
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
fail_below_min: true
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: '80 90'

- name: Code Coverage Result MD
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md

- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
21 changes: 20 additions & 1 deletion GofConsoleApp/Examples/ExecutionHelpers/PatternOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using GofConsoleApp.Examples.Creational.BuilderPattern;
using GofConsoleApp.Examples.Creational.FactoryPattern;
using GofConsoleApp.Examples.Structural.AdapterPattern;
using GofConsoleApp.Examples.Structural.BridgePattern;
using GofConsoleApp.Examples.Structural.DecoratorPattern;
using GofConsoleApp.Examples.Structural.FlyweightPattern;
using GofConsoleApp.Examples.Structural.ProxyPattern;
Expand Down Expand Up @@ -37,6 +38,9 @@ internal static class PatternOptions
internal const string StatePatternOptionDriveExample = "23.2";
internal const string StrategyPatternOptionSender = "24";
internal const string StrategyPatternOptionPayment = "24.2";
internal const string BridgePatterOptionSingleImplementations = "25";
internal const string BridgePatterOptionMultipleImplementations = "25.2";
internal const string BridgePatterOptionMarker = "25.3";

internal const string FactoryOption = "31";
internal const string AbstractFactoryOption = "32";
Expand Down Expand Up @@ -84,7 +88,8 @@ internal static class PatternOptions
},
{
ObserverPatternOptionWithType,
new PatternExampleMap("Observer Pattern >> News Publisher with type", new ObserverPatternExampleWithCategory())
new PatternExampleMap("Observer Pattern >> News Publisher with type",
new ObserverPatternExampleWithCategory())
},

// Behavioral Patterns
Expand Down Expand Up @@ -127,6 +132,20 @@ internal static class PatternOptions
StrategyPatternOptionPayment,
new PatternExampleMap("Strategy Pattern >> Payment Example", new StrategyPatternPaymentExample())
},
{
BridgePatterOptionSingleImplementations,
new PatternExampleMap("Bridge Pattern >> With Single Implementation",
new BridgePatternExampleSingleImplementations())
},
{
BridgePatterOptionMultipleImplementations,
new PatternExampleMap("Bridge Pattern >> With Multiple Implementations",
new BridgePatternExampleMultipleImplementations())
},
{
BridgePatterOptionMarker,
new PatternExampleMap("Bridge Pattern >> With Marker", new BridgePatternExampleWithMarker())
},

// Creational Patterns
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ public Employee(string id, string firstName, string lastName, string address)
}

public string Id { get; }

public string FirstName { get; }

public string LastName { get; }

public string Address { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
internal interface IEmployee
{
string Id { get; }

string FirstName { get; }

string LastName { get; }

string Address { get; }
}
Loading