Skip to content

Commit

Permalink
Merge pull request #2 from Kros-sk/policy-definition
Browse files Browse the repository at this point in the history
Full implementation
  • Loading branch information
Burgyn authored Apr 4, 2024
2 parents 99a5c99 + 34542f5 commit f1433db
Show file tree
Hide file tree
Showing 92 changed files with 3,716 additions and 111 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-stryker": {
"version": "4.0.0",
"commands": [
"dotnet-stryker"
]
}
}
}
30 changes: 30 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**
6 changes: 4 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ indent_size = 4
indent_style = space
insert_final_newline = true
charset = utf-8-bom
dotnet_style_operator_placement_when_wrapping = beginning_of_line
end_of_line = crlf

# Project files
[*.csproj]
Expand Down Expand Up @@ -97,8 +99,8 @@ dotnet_code_quality_unused_parameters = all:warning
#### C# Coding Conventions ####

# var preferences
csharp_style_var_elsewhere = false:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion

# Expression-bodied members
Expand Down
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Expected behavior**
A clear and concise description of what you expected to happen.

**To Reproduce**
Steps to reproduce the behavior:
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Please use Discussions page.**
If you have question or feature request, please use [Discussions page](https://github.com/Kros-sk/Kros.Ocelot.ETagCaching/discussions).

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Configuration for probot-no-response - https://github.com/probot/no-response

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: needs-more-info
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.
23 changes: 23 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name-template: 'Kros.Ocelot.ETagCaching v$NEXT_PATCH_VERSION ✈️'
tag-template: 'ocelot_etag_caching_v$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
labels:
- 'refactor 🛠️'
- 'unittests'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
template: |
## Changes
$CHANGES
---
22 changes: 22 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- bug
- enhancement
# Label to use when marking an issue as stale
staleLabel: inactive
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been automatically closed because it has not had
recent activity. Thank you
for your contributions.
43 changes: 43 additions & 0 deletions .github/workflows/issue-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Issue Manager

on:
schedule:
- cron: "0 0 * * *"
issue_comment:
types:
- created
- edited
issues:
types:
- labeled

jobs:
issue-manager:
runs-on: ubuntu-latest
steps:
- uses: tiangolo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
{
"answered": {
"delay": "P3DT12H30M5S",
"message": "It seems the issue was answered, closing this now."
},
"validated": {
"delay": 3000,
"message": "The issue could not be validated after 60 minutes. Closing now."
},
"waiting-1-day": {
"delay": 86400,
"message": "Closing after 1 day of waiting for the additional info requested."
},
"waiting-2-days": {
"delay": 172800,
"message": "Closing after 2 days of waiting for the additional info requested."
},
"waiting-8-days": {
"delay": 691200,
"message": "Closing after 8 days of waiting for the additional info requested."
}
}
61 changes: 61 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Main pipeline

on:
pull_request:
workflow_dispatch:
push:
branches:
- master

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core if needed
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Set execute permission for build.sh
run: chmod +x ./build.sh
- name: Restore
run: dotnet tool restore
- name: Build
run: ./build.sh --target Compile --configuration Release
- name: Test
run: ./build.sh --target Test --configuration Release
- name: Upload test results to GitHub
uses: dorny/test-reporter@v1
if: always()
with:
path: '**/TestResults/*.trx'
name: 'Unit Tests'
reporter: 'dotnet-trx'
fail-on-error: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Stryker
run: ./build.sh --target MutationTest --configuration Release
- name: Upload Stryker Results as Artifact
uses: actions/upload-artifact@v2
with:
name: stryker-results
path: '**/StrykerOutput/**/*.html'

deploy-to-nuget:
needs: build-and-test
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core if needed
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Set execute permission for build.sh
run: chmod +x ./build.sh
- name: Build
run: ./build.sh --target Compile --configuration Release
- name: Publish
run: ./build.sh --target Pack --configuration Release
- name: Publish to NuGet
run: ./build.sh --target Push --configuration Release --nuget-api-key ${{ secrets.NUGET_API_KEY }}
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
"AffectedProjects",
"Clean",
"Compile",
"MutationTest",
"Pack",
"PrintTestResults",
"Push",
"Restore",
"Test"
Expand All @@ -115,7 +117,9 @@
"AffectedProjects",
"Clean",
"Compile",
"MutationTest",
"Pack",
"PrintTestResults",
"Push",
"Restore",
"Test"
Expand Down
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<ItemGroup>
<!-- Please keep this file organized alphabetically. -->
<PackageVersion Include="Roslynator.Analyzers" Version="4.11.0" />
<PackageVersion Include="Ocelot" Version="23.1.0" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.0" />
<!-- Please keep this file organized alphabetically. -->
</ItemGroup>
</Project>
26 changes: 24 additions & 2 deletions Kros.Ocelot.ETagCaching.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{C548F9A1-4659-4252-A769-CC914FA3DDCC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShop.Gateway", "demo\EShop.Gateway\EShop.Gateway.csproj", "{177B6EDF-9C35-4AF2-9230-D855C1FDA8C6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShop.Products", "demo\EShop.Products\EShop.Products.csproj", "{653A055A-6C8A-42D0-B2F5-B9D57CBE1553}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{30935477-08D5-4932-ABD2-126A36215796}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C548F9A1-4659-4252-A769-CC914FA3DDCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C548F9A1-4659-4252-A769-CC914FA3DDCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A761BB50-FAD7-4932-8BB8-9DCE3F584BF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A761BB50-FAD7-4932-8BB8-9DCE3F584BF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A761BB50-FAD7-4932-8BB8-9DCE3F584BF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -36,10 +40,28 @@ Global
{0BF3CB1C-9D37-4975-B2EF-F87F256F990A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BF3CB1C-9D37-4975-B2EF-F87F256F990A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BF3CB1C-9D37-4975-B2EF-F87F256F990A}.Release|Any CPU.Build.0 = Release|Any CPU
{C548F9A1-4659-4252-A769-CC914FA3DDCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C548F9A1-4659-4252-A769-CC914FA3DDCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{177B6EDF-9C35-4AF2-9230-D855C1FDA8C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{177B6EDF-9C35-4AF2-9230-D855C1FDA8C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{177B6EDF-9C35-4AF2-9230-D855C1FDA8C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{177B6EDF-9C35-4AF2-9230-D855C1FDA8C6}.Release|Any CPU.Build.0 = Release|Any CPU
{653A055A-6C8A-42D0-B2F5-B9D57CBE1553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{653A055A-6C8A-42D0-B2F5-B9D57CBE1553}.Debug|Any CPU.Build.0 = Debug|Any CPU
{653A055A-6C8A-42D0-B2F5-B9D57CBE1553}.Release|Any CPU.ActiveCfg = Release|Any CPU
{653A055A-6C8A-42D0-B2F5-B9D57CBE1553}.Release|Any CPU.Build.0 = Release|Any CPU
{30935477-08D5-4932-ABD2-126A36215796}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30935477-08D5-4932-ABD2-126A36215796}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30935477-08D5-4932-ABD2-126A36215796}.Release|Any CPU.ActiveCfg = Release|Any CPU
{30935477-08D5-4932-ABD2-126A36215796}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{177B6EDF-9C35-4AF2-9230-D855C1FDA8C6} = {BE154B0A-ED1A-4BC9-8384-C72C40D102F5}
{653A055A-6C8A-42D0-B2F5-B9D57CBE1553} = {BE154B0A-ED1A-4BC9-8384-C72C40D102F5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DA3FAEF8-A1C8-40B9-B1C1-E49706893E52}
EndGlobalSection
Expand Down
Loading

0 comments on commit f1433db

Please sign in to comment.